From db2ff1944115816d5f779330ef062b5ce43fb513 Mon Sep 17 00:00:00 2001 From: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com> Date: Tue, 16 Apr 2024 07:57:14 +0000 Subject: [PATCH 1/4] Move Compute to main --- .../Compute.Autorest/Az.Compute.format.ps1xml | 598 ++- src/Compute/Compute.Autorest/Az.Compute.psd1 | 2 +- src/Compute/Compute.Autorest/Az.Compute.psm1 | 24 +- src/Compute/Compute.Autorest/README.md | 32 +- .../UX/Microsoft.Compute/locations.json | 42 + .../Invoke-AzSpotPlacementRecommender.md | 153 + .../exports/Get-AzGalleryApplication.ps1 | 9 +- .../Get-AzGalleryApplicationVersion.ps1 | 9 +- .../Invoke-AzSpotPlacementRecommender.ps1 | 309 ++ .../exports/New-AzGalleryApplication.ps1 | 8 +- .../New-AzGalleryApplicationVersion.ps1 | 8 +- .../exports/ProxyCmdletDefinitions.ps1 | 398 +- .../exports/Remove-AzGalleryApplication.ps1 | 9 +- .../Remove-AzGalleryApplicationVersion.ps1 | 9 +- .../exports/Remove-AzVMRunCommand.ps1 | 9 +- .../exports/Remove-AzVmssVMRunCommand.ps1 | 9 +- .../exports/Set-AzVMRunCommand.ps1 | 8 +- .../exports/Set-AzVmssVMRunCommand.ps1 | 8 +- .../exports/Update-AzGalleryApplication.ps1 | 9 +- .../Update-AzGalleryApplicationVersion.ps1 | 9 +- .../Compute.Autorest/generated/Module.cs | 8 + .../Compute.Autorest/generated/api/Compute.cs | 3817 ++++++++++++----- .../generated/api/Models/Any.PowerShell.cs | 136 + .../generated/api/Models/Any.TypeConverter.cs | 146 + .../generated/api/Models/Any.cs | 34 + .../generated/api/Models/Any.json.cs | 104 + .../Api10/ResourceAutoGenerated.PowerShell.cs | 176 + .../ResourceAutoGenerated.TypeConverter.cs | 147 + .../api/Models/Api10/ResourceAutoGenerated.cs | 128 + .../Api10/ResourceAutoGenerated.json.cs | 125 + ... => SystemDataAutoGenerated.PowerShell.cs} | 46 +- .../SystemDataAutoGenerated.TypeConverter.cs | 147 + ...stemData.cs => SystemDataAutoGenerated.cs} | 18 +- ...son.cs => SystemDataAutoGenerated.json.cs} | 18 +- .../Models/Api20220103/Gallery.PowerShell.cs | 20 +- .../api/Models/Api20220103/Gallery.cs | 37 +- .../api/Models/Api20220103/Gallery.json.cs | 2 +- .../GalleryApplication.PowerShell.cs | 20 +- .../Models/Api20220103/GalleryApplication.cs | 31 +- .../Api20220103/GalleryApplication.json.cs | 2 +- .../GalleryApplicationVersion.PowerShell.cs | 20 +- .../Api20220103/GalleryApplicationVersion.cs | 37 +- .../GalleryApplicationVersion.json.cs | 2 +- .../Api20220103/GalleryImage.PowerShell.cs | 20 +- .../api/Models/Api20220103/GalleryImage.cs | 37 +- .../Models/Api20220103/GalleryImage.json.cs | 2 +- .../GalleryImageVersion.PowerShell.cs | 20 +- .../Models/Api20220103/GalleryImageVersion.cs | 37 +- .../Api20220103/GalleryImageVersion.json.cs | 2 +- .../Resource.PowerShell.cs | 40 +- .../Resource.TypeConverter.cs | 6 +- .../Models/{Api10 => Api20220103}/Resource.cs | 12 +- .../{Api10 => Api20220103}/Resource.json.cs | 8 +- .../VirtualMachineRunCommand.PowerShell.cs | 20 +- .../Api20230701/VirtualMachineRunCommand.cs | 29 +- .../VirtualMachineRunCommand.json.cs | 4 +- .../ComputeDiagnosticBase.PowerShell.cs | 234 + .../ComputeDiagnosticBase.TypeConverter.cs | 147 + .../ComputeDiagnosticBase.cs | 137 + .../ComputeDiagnosticBase.json.cs | 110 + .../ComputeDiagnosticsList.PowerShell.cs | 154 + .../ComputeDiagnosticsList.TypeConverter.cs | 147 + .../ComputeDiagnosticsList.cs | 74 + .../ComputeDiagnosticsList.json.cs | 118 + ...teDiagnosticsOperationResult.PowerShell.cs | 220 + ...iagnosticsOperationResult.TypeConverter.cs | 148 + .../ComputeDiagnosticsOperationResult.cs | 199 + .../ComputeDiagnosticsOperationResult.json.cs | 116 + .../DiagnosticProperties.PowerShell.cs | 146 + .../DiagnosticProperties.TypeConverter.cs | 147 + .../DiagnosticProperties.cs | 51 + .../DiagnosticProperties.json.cs | 116 + .../ErrorDetailAutoGenerated.PowerShell.cs | 194 + .../ErrorDetailAutoGenerated.TypeConverter.cs | 147 + .../ErrorDetailAutoGenerated.cs | 142 + .../ErrorDetailAutoGenerated.json.cs | 124 + .../ErrorResponseAutoGenerated.PowerShell.cs | 186 + ...rrorResponseAutoGenerated.TypeConverter.cs | 147 + .../ErrorResponseAutoGenerated.cs | 131 + .../ErrorResponseAutoGenerated.json.cs | 108 + .../PlacementScore.PowerShell.cs | 176 + .../PlacementScore.TypeConverter.cs | 147 + .../Api20240301Preview/PlacementScore.cs | 119 + .../Api20240301Preview/PlacementScore.json.cs | 116 + .../ResourceSize.PowerShell.cs | 144 + .../ResourceSize.TypeConverter.cs | 147 + .../Models/Api20240301Preview/ResourceSize.cs | 51 + .../Api20240301Preview/ResourceSize.json.cs | 108 + .../RunDiskInspectionInput.PowerShell.cs | 162 + .../RunDiskInspectionInput.TypeConverter.cs | 147 + .../RunDiskInspectionInput.cs | 85 + .../RunDiskInspectionInput.json.cs | 112 + ...potPlacementRecommenderInput.PowerShell.cs | 170 + ...PlacementRecommenderInput.TypeConverter.cs | 147 + .../SpotPlacementRecommenderInput.cs | 102 + .../SpotPlacementRecommenderInput.json.cs | 130 + ...PlacementRecommenderResponse.PowerShell.cs | 178 + ...cementRecommenderResponse.TypeConverter.cs | 148 + .../SpotPlacementRecommenderResponse.cs | 119 + .../SpotPlacementRecommenderResponse.json.cs | 140 + .../StorageConfigurationInput.PowerShell.cs | 146 + ...StorageConfigurationInput.TypeConverter.cs | 147 + .../StorageConfigurationInput.cs | 57 + .../StorageConfigurationInput.json.cs | 108 + ...StorageConfigurationResponse.PowerShell.cs | 146 + ...rageConfigurationResponse.TypeConverter.cs | 147 + .../StorageConfigurationResponse.cs | 57 + .../StorageConfigurationResponse.json.cs | 108 + .../Api40/ErrorAdditionalInfo.PowerShell.cs | 152 + .../ErrorAdditionalInfo.TypeConverter.cs | 147 + .../api/Models/Api40/ErrorAdditionalInfo.cs | 74 + .../Models/Api40/ErrorAdditionalInfo.json.cs | 116 + .../Models/Api40/ErrorDetail.PowerShell.cs | 176 + .../Models/Api40/ErrorDetail.TypeConverter.cs | 147 + .../generated/api/Models/Api40/ErrorDetail.cs | 134 + .../api/Models/Api40/ErrorDetail.json.cs | 147 + .../Models/Api40/ErrorResponse.PowerShell.cs | 188 + .../Api40/ErrorResponse.TypeConverter.cs | 147 + .../api/Models/Api40/ErrorResponse.cs | 136 + .../api/Models/Api40/ErrorResponse.json.cs | 111 + .../Models/Api40/ProxyResource.PowerShell.cs | 218 + .../Api40/ProxyResource.TypeConverter.cs | 147 + .../api/Models/Api40/ProxyResource.cs | 113 + .../api/Models/Api40/ProxyResource.json.cs | 110 + .../ResourceAutoGenerated2.PowerShell.cs | 218 + .../ResourceAutoGenerated2.TypeConverter.cs | 147 + .../Models/Api40/ResourceAutoGenerated2.cs | 208 + .../Api40/ResourceAutoGenerated2.json.cs | 128 + .../api/Models/Api40/SystemData.PowerShell.cs | 184 + .../SystemData.TypeConverter.cs | 6 +- .../generated/api/Models/Api40/SystemData.cs | 136 + .../api/Models/Api40/SystemData.json.cs | 118 + .../api/Models/ComputeIdentity.PowerShell.cs | 8 + .../generated/api/Models/ComputeIdentity.cs | 17 + .../api/Models/ComputeIdentity.json.cs | 2 + .../api/Support/CreatedByType.Completer.cs | 47 + .../Support/CreatedByType.TypeConverter.cs | 59 + .../generated/api/Support/CreatedByType.cs | 102 + .../api/Support/ResultStatus.Completer.cs | 39 + .../api/Support/ResultStatus.TypeConverter.cs | 59 + .../generated/api/Support/ResultStatus.cs | 98 + .../GetAzGalleryApplicationVersion_Get.cs | 34 +- ...alleryApplicationVersion_GetViaIdentity.cs | 34 +- .../GetAzGalleryApplicationVersion_List.cs | 34 +- .../cmdlets/GetAzGalleryApplication_Get.cs | 34 +- .../GetAzGalleryApplication_GetViaIdentity.cs | 34 +- .../cmdlets/GetAzGalleryApplication_List.cs | 34 +- .../InvokeAzSpotPlacementRecommender_Post.cs | 439 ++ ...AzSpotPlacementRecommender_PostExpanded.cs | 475 ++ ...potPlacementRecommender_PostViaIdentity.cs | 428 ++ ...mentRecommender_PostViaIdentityExpanded.cs | 464 ++ ...alleryApplicationVersion_CreateExpanded.cs | 34 +- .../NewAzGalleryApplication_CreateExpanded.cs | 34 +- ...emoveAzGalleryApplicationVersion_Delete.cs | 34 +- ...eryApplicationVersion_DeleteViaIdentity.cs | 34 +- .../RemoveAzGalleryApplication_Delete.cs | 34 +- ...eAzGalleryApplication_DeleteViaIdentity.cs | 34 +- .../cmdlets/RemoveAzVMRunCommand_Delete.cs | 34 +- .../RemoveAzVMRunCommand_DeleteViaIdentity.cs | 34 +- .../RemoveAzVmssVMRunCommand_Delete.cs | 34 +- ...oveAzVmssVMRunCommand_DeleteViaIdentity.cs | 34 +- .../SetAzVMRunCommand_UpdateExpanded.cs | 34 +- .../SetAzVmssVMRunCommand_UpdateExpanded.cs | 34 +- ...alleryApplicationVersion_UpdateExpanded.cs | 34 +- ...cationVersion_UpdateViaIdentityExpanded.cs | 34 +- ...dateAzGalleryApplication_UpdateExpanded.cs | 34 +- ...ryApplication_UpdateViaIdentityExpanded.cs | 34 +- .../BuildTime/Models/PsProxyOutputs.cs | 23 +- .../Compute.Autorest/help/Az.Compute.md | 3 + .../help/Invoke-AzSpotPlacementRecommender.md | 391 ++ .../internal/Az.Compute.internal.psm1 | 4 +- .../internal/New-AzGalleryApplication.ps1 | 8 +- .../New-AzGalleryApplicationVersion.ps1 | 8 +- .../internal/ProxyCmdletDefinitions.ps1 | 25 +- .../Update-AzGalleryApplicationVersion.ps1 | 9 +- src/Compute/Compute.Autorest/test-module.ps1 | 8 +- ...-AzSpotPlacementRecommender.Recording.json | 154 + ...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 64 + src/Compute/Compute.Autorest/test/env.json | 10 +- src/Compute/Compute.Autorest/test/loadEnv.ps1 | 2 +- .../Compute.Autorest/test/localEnv.json | 10 +- .../utils/Get-SubscriptionIdTestSafe.ps1 | 7 + src/Compute/Compute/Az.Compute.psd1 | 21 +- .../Compute/help/Add-AzImageDataDisk.md | 17 +- .../help/Add-AzVMAdditionalUnattendContent.md | 17 +- src/Compute/Compute/help/Add-AzVMDataDisk.md | 19 +- .../Compute/help/Add-AzVMNetworkInterface.md | 19 +- src/Compute/Compute/help/Add-AzVMSecret.md | 17 +- .../Compute/help/Add-AzVMSshPublicKey.md | 17 +- src/Compute/Compute/help/Add-AzVhd.md | 19 +- .../help/Add-AzVmGalleryApplication.md | 17 +- .../Add-AzVmssAdditionalUnattendContent.md | 17 +- .../Compute/help/Add-AzVmssDataDisk.md | 17 +- .../help/Add-AzVmssDiagnosticsExtension.md | 17 +- .../Compute/help/Add-AzVmssExtension.md | 17 +- .../help/Add-AzVmssGalleryApplication.md | 17 +- ...Add-AzVmssNetworkInterfaceConfiguration.md | 17 +- .../Compute/help/Add-AzVmssRunCommand.md | 19 +- src/Compute/Compute/help/Add-AzVmssSecret.md | 17 +- .../Compute/help/Add-AzVmssSshPublicKey.md | 17 +- .../Compute/help/Add-AzVmssVMDataDisk.md | 17 +- .../Compute/help/Add-AzVmssWinRMListener.md | 17 +- src/Compute/Compute/help/Az.Compute.md | 3 + .../Compute/help/ConvertTo-AzVMManagedDisk.md | 17 +- .../help/Disable-AzVMDiskEncryption.md | 17 +- .../help/Disable-AzVmssDiskEncryption.md | 17 +- ...port-AzLogAnalyticRequestRateByInterval.md | 17 +- .../Export-AzLogAnalyticThrottledRequest.md | 17 +- .../Compute/help/Get-AzAvailabilitySet.md | 17 +- .../Compute/help/Get-AzCapacityReservation.md | 17 +- .../help/Get-AzCapacityReservationGroup.md | 19 +- .../Compute/help/Get-AzComputeResourceSku.md | 17 +- src/Compute/Compute/help/Get-AzDisk.md | 17 +- src/Compute/Compute/help/Get-AzDiskAccess.md | 19 +- .../Compute/help/Get-AzDiskEncryptionSet.md | 17 +- ...t-AzDiskEncryptionSetAssociatedResource.md | 17 +- src/Compute/Compute/help/Get-AzGallery.md | 23 +- .../Compute/help/Get-AzGalleryApplication.md | 21 +- .../help/Get-AzGalleryApplicationVersion.md | 21 +- .../help/Get-AzGalleryImageDefinition.md | 25 +- .../Compute/help/Get-AzGalleryImageVersion.md | 25 +- src/Compute/Compute/help/Get-AzHost.md | 19 +- src/Compute/Compute/help/Get-AzHostGroup.md | 19 +- src/Compute/Compute/help/Get-AzHostSize.md | 17 +- src/Compute/Compute/help/Get-AzImage.md | 17 +- .../help/Get-AzProximityPlacementGroup.md | 19 +- .../Compute/help/Get-AzRemoteDesktopFile.md | 19 +- .../Compute/help/Get-AzRestorePoint.md | 17 +- .../help/Get-AzRestorePointCollection.md | 17 +- src/Compute/Compute/help/Get-AzSnapshot.md | 17 +- src/Compute/Compute/help/Get-AzSshKey.md | 19 +- src/Compute/Compute/help/Get-AzVM.md | 23 +- .../Compute/help/Get-AzVMADDomainExtension.md | 17 +- .../Compute/help/Get-AzVMAEMExtension.md | 17 +- .../Compute/help/Get-AzVMAccessExtension.md | 17 +- .../help/Get-AzVMBootDiagnosticsData.md | 19 +- .../Compute/help/Get-AzVMChefExtension.md | 19 +- .../help/Get-AzVMCustomScriptExtension.md | 17 +- .../help/Get-AzVMDiagnosticsExtension.md | 17 +- .../help/Get-AzVMDiskEncryptionStatus.md | 17 +- .../Compute/help/Get-AzVMDscExtension.md | 19 +- .../help/Get-AzVMDscExtensionStatus.md | 19 +- src/Compute/Compute/help/Get-AzVMExtension.md | 21 +- .../Compute/help/Get-AzVMExtensionImage.md | 17 +- .../help/Get-AzVMExtensionImageType.md | 17 +- src/Compute/Compute/help/Get-AzVMImage.md | 19 +- .../Compute/help/Get-AzVMImageOffer.md | 17 +- .../Compute/help/Get-AzVMImagePublisher.md | 17 +- src/Compute/Compute/help/Get-AzVMImageSku.md | 17 +- .../Compute/help/Get-AzVMRunCommand.md | 17 +- .../help/Get-AzVMRunCommandDocument.md | 17 +- src/Compute/Compute/help/Get-AzVMSize.md | 21 +- .../help/Get-AzVMSqlServerExtension.md | 17 +- src/Compute/Compute/help/Get-AzVMUsage.md | 17 +- src/Compute/Compute/help/Get-AzVmss.md | 23 +- .../Compute/help/Get-AzVmssDiskEncryption.md | 17 +- .../Compute/help/Get-AzVmssRollingUpgrade.md | 17 +- src/Compute/Compute/help/Get-AzVmssSku.md | 17 +- src/Compute/Compute/help/Get-AzVmssVM.md | 19 +- .../help/Get-AzVmssVMDiskEncryption.md | 17 +- .../Compute/help/Get-AzVmssVMRunCommand.md | 17 +- .../Compute/help/Grant-AzDiskAccess.md | 17 +- .../Compute/help/Grant-AzSnapshotAccess.md | 17 +- .../help/Invoke-AzSpotPlacementRecommender.md | 405 ++ .../Compute/help/Invoke-AzVMInstallPatch.md | 27 +- .../help/Invoke-AzVMPatchAssessment.md | 21 +- .../Compute/help/Invoke-AzVMReimage.md | 17 +- .../Compute/help/Invoke-AzVMRunCommand.md | 21 +- .../Compute/help/Invoke-AzVmssVMRunCommand.md | 21 +- .../Compute/help/New-AzAvailabilitySet.md | 17 +- .../Compute/help/New-AzCapacityReservation.md | 17 +- .../help/New-AzCapacityReservationGroup.md | 17 +- src/Compute/Compute/help/New-AzDisk.md | 17 +- src/Compute/Compute/help/New-AzDiskAccess.md | 17 +- src/Compute/Compute/help/New-AzDiskConfig.md | 17 +- .../Compute/help/New-AzDiskEncryptionSet.md | 17 +- .../help/New-AzDiskEncryptionSetConfig.md | 17 +- .../help/New-AzDiskPurchasePlanConfig.md | 17 +- .../Compute/help/New-AzDiskUpdateConfig.md | 17 +- src/Compute/Compute/help/New-AzGallery.md | 17 +- .../Compute/help/New-AzGalleryApplication.md | 17 +- .../help/New-AzGalleryApplicationVersion.md | 17 +- .../help/New-AzGalleryImageDefinition.md | 17 +- .../Compute/help/New-AzGalleryImageVersion.md | 30 +- src/Compute/Compute/help/New-AzHost.md | 17 +- src/Compute/Compute/help/New-AzHostGroup.md | 17 +- src/Compute/Compute/help/New-AzImage.md | 17 +- src/Compute/Compute/help/New-AzImageConfig.md | 17 +- .../help/New-AzProximityPlacementGroup.md | 17 +- .../Compute/help/New-AzRestorePoint.md | 17 +- .../help/New-AzRestorePointCollection.md | 19 +- src/Compute/Compute/help/New-AzSnapshot.md | 17 +- .../Compute/help/New-AzSnapshotConfig.md | 17 +- .../help/New-AzSnapshotUpdateConfig.md | 17 +- src/Compute/Compute/help/New-AzSshKey.md | 17 +- src/Compute/Compute/help/New-AzVM.md | 21 +- src/Compute/Compute/help/New-AzVMConfig.md | 19 +- src/Compute/Compute/help/New-AzVMDataDisk.md | 19 +- .../help/New-AzVMSqlServerAutoBackupConfig.md | 19 +- .../New-AzVMSqlServerAutoPatchingConfig.md | 17 +- ...w-AzVMSqlServerKeyVaultCredentialConfig.md | 17 +- .../help/New-AzVmGalleryApplication.md | 17 +- src/Compute/Compute/help/New-AzVmss.md | 19 +- src/Compute/Compute/help/New-AzVmssConfig.md | 19 +- .../help/New-AzVmssGalleryApplication.md | 17 +- .../Compute/help/New-AzVmssIpConfig.md | 17 +- .../Compute/help/New-AzVmssIpTagConfig.md | 17 +- .../help/New-AzVmssVaultCertificateConfig.md | 17 +- .../help/Publish-AzVMDscConfiguration.md | 19 +- .../Compute/help/Remove-AzAvailabilitySet.md | 17 +- .../help/Remove-AzCapacityReservation.md | 17 +- .../help/Remove-AzCapacityReservationGroup.md | 21 +- src/Compute/Compute/help/Remove-AzDisk.md | 17 +- .../Compute/help/Remove-AzDiskAccess.md | 21 +- .../help/Remove-AzDiskEncryptionSet.md | 21 +- src/Compute/Compute/help/Remove-AzGallery.md | 21 +- .../help/Remove-AzGalleryApplication.md | 19 +- .../Remove-AzGalleryApplicationVersion.md | 19 +- .../help/Remove-AzGalleryImageDefinition.md | 21 +- .../help/Remove-AzGalleryImageVersion.md | 21 +- src/Compute/Compute/help/Remove-AzHost.md | 21 +- .../Compute/help/Remove-AzHostGroup.md | 21 +- src/Compute/Compute/help/Remove-AzImage.md | 17 +- .../Compute/help/Remove-AzImageDataDisk.md | 17 +- .../help/Remove-AzProximityPlacementGroup.md | 21 +- .../Compute/help/Remove-AzRestorePoint.md | 17 +- .../help/Remove-AzRestorePointCollection.md | 17 +- src/Compute/Compute/help/Remove-AzSnapshot.md | 17 +- src/Compute/Compute/help/Remove-AzSshKey.md | 21 +- src/Compute/Compute/help/Remove-AzVM.md | 19 +- .../Compute/help/Remove-AzVMAEMExtension.md | 17 +- .../help/Remove-AzVMAccessExtension.md | 17 +- src/Compute/Compute/help/Remove-AzVMBackup.md | 17 +- .../Compute/help/Remove-AzVMChefExtension.md | 19 +- .../help/Remove-AzVMCustomScriptExtension.md | 17 +- .../Compute/help/Remove-AzVMDataDisk.md | 17 +- .../help/Remove-AzVMDiagnosticsExtension.md | 17 +- .../Remove-AzVMDiskEncryptionExtension.md | 17 +- .../Compute/help/Remove-AzVMDscExtension.md | 17 +- .../Compute/help/Remove-AzVMExtension.md | 17 +- .../help/Remove-AzVMNetworkInterface.md | 17 +- .../Compute/help/Remove-AzVMRunCommand.md | 19 +- src/Compute/Compute/help/Remove-AzVMSecret.md | 17 +- .../help/Remove-AzVMSqlServerExtension.md | 17 +- .../help/Remove-AzVmGalleryApplication.md | 17 +- src/Compute/Compute/help/Remove-AzVmss.md | 17 +- .../Compute/help/Remove-AzVmssDataDisk.md | 19 +- .../help/Remove-AzVmssDiagnosticsExtension.md | 17 +- .../Compute/help/Remove-AzVmssExtension.md | 19 +- .../help/Remove-AzVmssGalleryApplication.md | 17 +- ...ove-AzVmssNetworkInterfaceConfiguration.md | 19 +- .../Compute/help/Remove-AzVmssRunCommand.md | 17 +- .../Compute/help/Remove-AzVmssVMDataDisk.md | 17 +- .../Compute/help/Remove-AzVmssVMRunCommand.md | 19 +- .../Repair-AzVmssServiceFabricUpdateDomain.md | 21 +- src/Compute/Compute/help/Restart-AzHost.md | 21 +- src/Compute/Compute/help/Restart-AzVM.md | 23 +- src/Compute/Compute/help/Restart-AzVmss.md | 17 +- .../Compute/help/Revoke-AzDiskAccess.md | 17 +- .../Compute/help/Revoke-AzSnapshotAccess.md | 17 +- src/Compute/Compute/help/Save-AzVMImage.md | 19 +- src/Compute/Compute/help/Save-AzVhd.md | 19 +- .../help/Set-AzDiskDiskEncryptionKey.md | 17 +- .../Compute/help/Set-AzDiskImageReference.md | 17 +- .../help/Set-AzDiskKeyEncryptionKey.md | 17 +- .../Compute/help/Set-AzDiskSecurityProfile.md | 17 +- .../help/Set-AzDiskUpdateDiskEncryptionKey.md | 17 +- .../help/Set-AzDiskUpdateKeyEncryptionKey.md | 17 +- src/Compute/Compute/help/Set-AzImageOsDisk.md | 17 +- .../help/Set-AzSnapshotDiskEncryptionKey.md | 17 +- .../help/Set-AzSnapshotImageReference.md | 17 +- .../help/Set-AzSnapshotKeyEncryptionKey.md | 17 +- .../Set-AzSnapshotUpdateDiskEncryptionKey.md | 17 +- .../Set-AzSnapshotUpdateKeyEncryptionKey.md | 17 +- src/Compute/Compute/help/Set-AzVM.md | 31 +- .../Compute/help/Set-AzVMADDomainExtension.md | 17 +- .../Compute/help/Set-AzVMAEMExtension.md | 17 +- .../Compute/help/Set-AzVMAccessExtension.md | 17 +- .../Compute/help/Set-AzVMBackupExtension.md | 17 +- .../Compute/help/Set-AzVMBginfoExtension.md | 17 +- .../Compute/help/Set-AzVMBootDiagnostic.md | 19 +- .../Compute/help/Set-AzVMChefExtension.md | 19 +- .../help/Set-AzVMCustomScriptExtension.md | 31 +- src/Compute/Compute/help/Set-AzVMDataDisk.md | 19 +- .../help/Set-AzVMDiagnosticsExtension.md | 17 +- .../help/Set-AzVMDiskEncryptionExtension.md | 25 +- .../Compute/help/Set-AzVMDscExtension.md | 17 +- src/Compute/Compute/help/Set-AzVMExtension.md | 19 +- src/Compute/Compute/help/Set-AzVMOSDisk.md | 25 +- .../Compute/help/Set-AzVMOperatingSystem.md | 25 +- src/Compute/Compute/help/Set-AzVMPlan.md | 17 +- .../Compute/help/Set-AzVMRunCommand.md | 19 +- .../Compute/help/Set-AzVMSecurityProfile.md | 17 +- .../Compute/help/Set-AzVMSourceImage.md | 19 +- .../help/Set-AzVMSqlServerExtension.md | 17 +- src/Compute/Compute/help/Set-AzVMUefi.md | 17 +- src/Compute/Compute/help/Set-AzVmss.md | 23 +- .../Compute/help/Set-AzVmssBootDiagnostic.md | 17 +- .../help/Set-AzVmssDiskEncryptionExtension.md | 17 +- .../Set-AzVmssOrchestrationServiceState.md | 21 +- .../Compute/help/Set-AzVmssOsProfile.md | 17 +- .../help/Set-AzVmssRollingUpgradePolicy.md | 17 +- .../Compute/help/Set-AzVmssSecurityProfile.md | 17 +- .../Compute/help/Set-AzVmssStorageProfile.md | 17 +- src/Compute/Compute/help/Set-AzVmssUefi.md | 17 +- src/Compute/Compute/help/Set-AzVmssVM.md | 25 +- .../Compute/help/Set-AzVmssVMRunCommand.md | 19 +- src/Compute/Compute/help/Start-AzVM.md | 19 +- src/Compute/Compute/help/Start-AzVmss.md | 17 +- .../Start-AzVmssRollingExtensionUpgrade.md | 21 +- .../help/Start-AzVmssRollingOSUpgrade.md | 17 +- src/Compute/Compute/help/Stop-AzVM.md | 23 +- src/Compute/Compute/help/Stop-AzVmss.md | 19 +- .../Compute/help/Stop-AzVmssRollingUpgrade.md | 17 +- .../Compute/help/Test-AzVMAEMExtension.md | 17 +- .../Compute/help/Update-AzAvailabilitySet.md | 17 +- .../help/Update-AzCapacityReservation.md | 23 +- .../help/Update-AzCapacityReservationGroup.md | 23 +- src/Compute/Compute/help/Update-AzDisk.md | 19 +- .../help/Update-AzDiskEncryptionSet.md | 21 +- src/Compute/Compute/help/Update-AzGallery.md | 21 +- .../help/Update-AzGalleryApplication.md | 19 +- .../Update-AzGalleryApplicationVersion.md | 19 +- .../help/Update-AzGalleryImageDefinition.md | 21 +- .../help/Update-AzGalleryImageVersion.md | 21 +- src/Compute/Compute/help/Update-AzHost.md | 19 +- src/Compute/Compute/help/Update-AzImage.md | 21 +- .../help/Update-AzRestorePointCollection.md | 17 +- src/Compute/Compute/help/Update-AzSnapshot.md | 19 +- src/Compute/Compute/help/Update-AzSshKey.md | 21 +- src/Compute/Compute/help/Update-AzVM.md | 21 +- src/Compute/Compute/help/Update-AzVmss.md | 19 +- .../Compute/help/Update-AzVmssInstance.md | 17 +- src/Compute/Compute/help/Update-AzVmssVM.md | 21 +- 434 files changed, 24323 insertions(+), 1952 deletions(-) create mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json create mode 100644 src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md create mode 100644 src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1 create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Any.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.json.cs rename src/Compute/Compute.Autorest/generated/api/Models/Api10/{SystemData.PowerShell.cs => SystemDataAutoGenerated.PowerShell.cs} (67%) create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.TypeConverter.cs rename src/Compute/Compute.Autorest/generated/api/Models/Api10/{SystemData.cs => SystemDataAutoGenerated.cs} (86%) rename src/Compute/Compute.Autorest/generated/api/Models/Api10/{SystemData.json.cs => SystemDataAutoGenerated.json.cs} (90%) rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.PowerShell.cs (71%) rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.TypeConverter.cs (97%) rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.cs (91%) rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api20220103}/Resource.json.cs (96%) create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.PowerShell.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs rename src/Compute/Compute.Autorest/generated/api/Models/{Api10 => Api40}/SystemData.TypeConverter.cs (97%) create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.json.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.Completer.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.Completer.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.TypeConverter.cs create mode 100644 src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.cs create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_Post.cs create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostExpanded.cs create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentity.cs create mode 100644 src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentityExpanded.cs create mode 100644 src/Compute/Compute.Autorest/help/Invoke-AzSpotPlacementRecommender.md create mode 100644 src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json create mode 100644 src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 create mode 100644 src/Compute/Compute/help/Invoke-AzSpotPlacementRecommender.md diff --git a/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml b/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml index aaedc1a0e79c..f4503b4852b0 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml +++ b/src/Compute/Compute.Autorest/Az.Compute.format.ps1xml @@ -32,6 +32,9 @@ + + + @@ -75,6 +78,9 @@ Location + + OperationId + ResourceGroupName @@ -95,6 +101,562 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ProxyResource + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ProxyResource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2 + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2 + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsList + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsList + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsOperationResult + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsOperationResult + + + + + + + + + + + + + + + + + + + + + CreatedUtc + + + Message + + + ResponseField + + + ResultStatus + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties + + + + + + + + + + + + SupportedResourceType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ErrorDetailAutoGenerated + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ErrorDetailAutoGenerated + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScore + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScore + + + + + + + + + + + + + + + + + + + + + + + + AvailabilityZone + + + IsQuotaAvailable + + + Region + + + Score + + + Sku + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize + + + + + + + + + + + + Sku + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.RunDiskInspectionInput + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.RunDiskInspectionInput + + + + + + + + + + + + + + + + + + Manifest + + + ResourceId + + + UploadSasUri + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput + + + + + + + + + + + + + + + + + + AvailabilityZone + + + DesiredCount + + + DesiredLocation + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderResponse + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderResponse + + + + + + + + + + + + + + + + + + AvailabilityZone + + + DesiredCount + + + DesiredLocation + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationInput + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationInput + + + + + + + + + + + + StorageAccountId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationResponse + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationResponse + + + + + + + + + + + + StorageAccountId + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20230701.InstanceViewStatus @@ -1919,6 +2481,34 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource + + + + + + + + + + + + + + + Location + + + Name + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ResourceRange @@ -2322,9 +2912,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceAutoGenerated @@ -2422,9 +3012,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemData + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemDataAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemData + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.SystemDataAutoGenerated diff --git a/src/Compute/Compute.Autorest/Az.Compute.psd1 b/src/Compute/Compute.Autorest/Az.Compute.psd1 index f3641cbe6b9e..d7f3d2c4f869 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.psd1 +++ b/src/Compute/Compute.Autorest/Az.Compute.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Compute.private.dll' FormatsToProcess = './Az.Compute.format.ps1xml' - FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*' + FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'Invoke-AzSpotPlacementRecommender', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/Compute/Compute.Autorest/Az.Compute.psm1 b/src/Compute/Compute.Autorest/Az.Compute.psm1 index 051b2c02cb57..954a09bdaaa4 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.psm1 +++ b/src/Compute/Compute.Autorest/Az.Compute.psm1 @@ -47,37 +47,41 @@ # 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.Compute.custom.psm1' if(Test-Path $customModulePath) { $null = Import-Module -Name $customModulePath } - + # Export nothing to clear implicit exports Export-ModuleMember @@ -97,12 +101,12 @@ # 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 diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index 991f1aa1566e..1191e34e1c26 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -26,7 +26,7 @@ For information on how to develop for `Az.Compute`, see [how-to.md](how-to.md). ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -commit: 1a925d1afe288a5f20d078bbc89214a36a0e4287 +commit: 77c47a7fba8d8b900595966b81d6bb92a0308370 require: # readme.azure.noprofile.md is the common configuration file - $(this-folder)/../../readme.azure.noprofile.md @@ -35,6 +35,7 @@ input-file: - $(repo)/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2022-01-03/gallery.json - $(repo)/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-07-01/runCommand.json - $(repo)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json + - $(repo)/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/preview/2024-03-01-preview/diagnostic.json # If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally module-version: 0.3.0 # Normally, title is the service name @@ -232,4 +233,33 @@ directive: subject: VMRunCommand|VmssVMRunCommand verb: Get remove: true + ### Remove All Diagnostic cmdlets aside from Invoke Spot Placement Recommender - generate ONLY SpotPlacementRecommender cmdlets + - where: + verb: Get + subject: Diagnostic + remove: true + - where: + verb: Get + subject: DiskInspection + remove: true + - where: + verb: New + subject: DiskInspection + remove: true + - where: + verb: Read + subject: DiagnosticOperation + remove: true + - where: + verb: Register + subject: DiskInspectionStorageConfiguration + remove: true + - where: + verb: Test + subject: DiskInspectionStorageConfiguration + remove: true + - where: + verb: Get + subject: SpotPlacementRecommender + remove: true ``` diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json new file mode 100644 index 000000000000..da311989216d --- /dev/null +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json @@ -0,0 +1,42 @@ +{ + "resourceType": "locations", + "apiVersion": "2024-03-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute" + }, + "commands": [ + { + "name": "Invoke-AzSpotPlacementRecommender", + "description": "Generates placement scores for Spot VM skus.", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender" + }, + "parameterSets": [ + { + "parameters": [ + "-Location ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Generates placement scores for Spot VM skus.", + "parameters": [ + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md new file mode 100644 index 000000000000..2ed3d44b2433 --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md @@ -0,0 +1,153 @@ +### Example 1: Regionally scoped Spot Placement Recommender scores +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus DataNotFoundOrStale Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` + +Returns zonally scoped spot placement recommender scores for the input. + +### Example 3: Regionally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus High Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus High Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus High Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` + +Returns zonally scoped spot placement recommender scores for the input. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 index 3063550ed80d..a4dbcc004418 100644 --- a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplication.ps1 @@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -172,7 +173,13 @@ begin { List = 'Az.Compute.private\Get-AzGalleryApplication_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 index 565e1406705e..7b474d8e8d98 100644 --- a/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/Get-AzGalleryApplicationVersion.ps1 @@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -187,7 +188,13 @@ begin { List = 'Az.Compute.private\Get-AzGalleryApplicationVersion_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1 b/src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1 new file mode 100644 index 000000000000..a1c87d5e8cc4 --- /dev/null +++ b/src/Compute/Compute.Autorest/exports/Invoke-AzSpotPlacementRecommender.ps1 @@ -0,0 +1,309 @@ + +# ---------------------------------------------------------------------------------- +# 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 placement scores for Spot VM skus. +.Description +Generates placement scores for Spot VM skus. +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes +$response.PlacementScore +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone +$response.PlacementScore +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse +.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. + +DESIREDSIZE : The desired resource SKUs. + [Sku ]: The resource's CRP virtual machine SKU size. + +INPUTOBJECT : Identity Parameter + [CommandId ]: The command id. + [GalleryApplicationName ]: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + [GalleryApplicationVersionName ]: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + [GalleryImageName ]: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + [GalleryImageVersionName ]: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + [GalleryName ]: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + [Id ]: Resource identity path + [InstanceId ]: The instance ID of the virtual machine. + [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. + [ResourceGroupName ]: The name of the resource group. + [RunCommandName ]: The name of the virtual machine run command. + [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [VMName ]: The name of the virtual machine where the run command should be created or updated. + [VMScaleSetName ]: The name of the VM scale set. + +SPOTPLACEMENTRECOMMENDERINPUT : SpotPlacementRecommender API Input. + [AvailabilityZone ]: Defines if the scope is zonal or regional. + [DesiredCount ]: Desired instance count per region/zone based on the scope. + [DesiredLocation ]: The desired regions + [DesiredSize ]: The desired resource SKUs. + [Sku ]: The resource's CRP virtual machine SKU size. +.Link +https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender +#> +function Invoke-AzSpotPlacementRecommender { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse])] +[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Post', Mandatory)] + [Parameter(ParameterSetName='PostExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Post')] + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Subscription credentials which uniquely identify Microsoft Azure subscription. + # The subscription ID forms part of the URI for every service call. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput] + # SpotPlacementRecommender API Input. + # To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table. + ${SpotPlacementRecommenderInput}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Defines if the scope is zonal or regional. + ${AvailabilityZone}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.Int32] + # Desired instance count per region/zone based on the scope. + ${DesiredCount}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String[]] + # The desired regions + ${DesiredLocation}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]] + # The desired resource SKUs. + # To construct, see NOTES section for DESIREDSIZE properties and create a hash table. + ${DesiredSize}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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 = @{ + Post = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_Post'; + PostExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostExpanded'; + PostViaIdentity = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentity'; + PostViaIdentityExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentityExpanded'; + } + if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 index 08656c4da937..c47d3650d00d 100644 --- a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplication.ps1 @@ -183,7 +183,13 @@ begin { __AllParameterSets = 'Az.Compute.custom\New-AzGalleryApplication'; } if (('__AllParameterSets') -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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 index 42f8d76fb65b..c4515275fc2a 100644 --- a/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/New-AzGalleryApplicationVersion.ps1 @@ -278,7 +278,13 @@ begin { CreateExpanded = 'Az.Compute.custom\New-AzGalleryApplicationVersion'; } 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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 index 3ace79a90357..58cf0d99c0a6 100644 --- a/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Compute/Compute.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -187,7 +188,13 @@ begin { List = 'Az.Compute.private\Get-AzGalleryApplicationVersion_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -268,6 +275,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -397,7 +405,307 @@ begin { List = 'Az.Compute.private\Get-AzGalleryApplication_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.Compute.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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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 placement scores for Spot VM skus. +.Description +Generates placement scores for Spot VM skus. +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes +$response.PlacementScore +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone +$response.PlacementScore +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +.Example +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse +.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. + +DESIREDSIZE : The desired resource SKUs. + [Sku ]: The resource's CRP virtual machine SKU size. + +INPUTOBJECT : Identity Parameter + [CommandId ]: The command id. + [GalleryApplicationName ]: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + [GalleryApplicationVersionName ]: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + [GalleryImageName ]: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + [GalleryImageVersionName ]: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + [GalleryName ]: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + [Id ]: Resource identity path + [InstanceId ]: The instance ID of the virtual machine. + [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. + [ResourceGroupName ]: The name of the resource group. + [RunCommandName ]: The name of the virtual machine run command. + [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [VMName ]: The name of the virtual machine where the run command should be created or updated. + [VMScaleSetName ]: The name of the VM scale set. + +SPOTPLACEMENTRECOMMENDERINPUT : SpotPlacementRecommender API Input. + [AvailabilityZone ]: Defines if the scope is zonal or regional. + [DesiredCount ]: Desired instance count per region/zone based on the scope. + [DesiredLocation ]: The desired regions + [DesiredSize ]: The desired resource SKUs. + [Sku ]: The resource's CRP virtual machine SKU size. +.Link +https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender +#> +function Invoke-AzSpotPlacementRecommender { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse])] +[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Post', Mandatory)] + [Parameter(ParameterSetName='PostExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Post')] + [Parameter(ParameterSetName='PostExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Subscription credentials which uniquely identify Microsoft Azure subscription. + # The subscription ID forms part of the URI for every service call. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput] + # SpotPlacementRecommender API Input. + # To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table. + ${SpotPlacementRecommenderInput}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Defines if the scope is zonal or regional. + ${AvailabilityZone}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.Int32] + # Desired instance count per region/zone based on the scope. + ${DesiredCount}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [System.String[]] + # The desired regions + ${DesiredLocation}, + + [Parameter(ParameterSetName='PostExpanded')] + [Parameter(ParameterSetName='PostViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]] + # The desired resource SKUs. + # To construct, see NOTES section for DESIREDSIZE properties and create a hash table. + ${DesiredSize}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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 = @{ + Post = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_Post'; + PostExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostExpanded'; + PostViaIdentity = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentity'; + PostViaIdentityExpanded = 'Az.Compute.private\Invoke-AzSpotPlacementRecommender_PostViaIdentityExpanded'; + } + if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -476,6 +784,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -625,7 +934,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -704,6 +1019,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -847,7 +1163,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplication_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -926,6 +1248,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -1068,7 +1391,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzVMRunCommand_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1147,6 +1476,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -1295,7 +1625,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzVmssVMRunCommand_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1648,7 +1984,13 @@ begin { ScriptLocalPath = 'Az.Compute.custom\Set-AzVMRunCommand_ScriptLocalPath'; } if (('UpdateExpanded', 'ScriptLocalPath') -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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2007,7 +2349,13 @@ begin { ScriptLocalPath = 'Az.Compute.custom\Set-AzVmssVMRunCommand_ScriptLocalPath'; } if (('UpdateExpanded', 'ScriptLocalPath') -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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2086,6 +2434,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -2239,7 +2588,13 @@ begin { UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplication_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2460,7 +2815,13 @@ begin { __AllParameterSets = 'Az.Compute.custom\New-AzGalleryApplication'; } if (('__AllParameterSets') -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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2776,7 +3137,13 @@ begin { CreateExpanded = 'Az.Compute.custom\New-AzGalleryApplicationVersion'; } 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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2861,6 +3228,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -3069,7 +3437,13 @@ begin { UpdateViaIdentityExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion'; } 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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 index 5bfdaef3bdd8..f6fd4aa2f0ae 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplication.ps1 @@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -184,7 +185,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplication_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 index a33dfb3337e4..f5dba4446caf 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzGalleryApplicationVersion.ps1 @@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -190,7 +191,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzGalleryApplicationVersion_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 index 6370946cc705..f46c594dab71 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzVMRunCommand.ps1 @@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -183,7 +184,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzVMRunCommand_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 index 01bd0642ac23..04d7ffe35ac6 100644 --- a/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Remove-AzVmssVMRunCommand.ps1 @@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -189,7 +190,13 @@ begin { DeleteViaIdentity = 'Az.Compute.private\Remove-AzVmssVMRunCommand_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 index 7fafb658d7e7..9ca0f205a0cf 100644 --- a/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Set-AzVMRunCommand.ps1 @@ -315,7 +315,13 @@ begin { ScriptLocalPath = 'Az.Compute.custom\Set-AzVMRunCommand_ScriptLocalPath'; } if (('UpdateExpanded', 'ScriptLocalPath') -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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 b/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 index 990e4b684328..fef6243541a1 100644 --- a/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 +++ b/src/Compute/Compute.Autorest/exports/Set-AzVmssVMRunCommand.ps1 @@ -321,7 +321,13 @@ begin { ScriptLocalPath = 'Az.Compute.custom\Set-AzVmssVMRunCommand_ScriptLocalPath'; } if (('UpdateExpanded', 'ScriptLocalPath') -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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 index 18c041374f3c..1e50fd682d6a 100644 --- a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplication.ps1 @@ -41,6 +41,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -194,7 +195,13 @@ begin { UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplication_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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 index 69999a89d997..cc902da3c99d 100644 --- a/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/exports/Update-AzGalleryApplicationVersion.ps1 @@ -47,6 +47,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -255,7 +256,13 @@ begin { UpdateViaIdentityExpanded = 'Az.Compute.custom\Update-AzGalleryApplicationVersion'; } 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.Compute.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.Compute.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/Compute/Compute.Autorest/generated/Module.cs b/src/Compute/Compute.Autorest/generated/Module.cs index 0ceba6e9bb36..a1d2a25f8961 100644 --- a/src/Compute/Compute.Autorest/generated/Module.cs +++ b/src/Compute/Compute.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute 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 @@ -51,6 +53,9 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.Compute.Module _instance; @@ -72,6 +77,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.Compute"; + /// 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; } diff --git a/src/Compute/Compute.Autorest/generated/api/Compute.cs b/src/Compute/Compute.Autorest/generated/api/Compute.cs index cd14d2af6aa9..391d1cd32fa2 100644 --- a/src/Compute/Compute.Autorest/generated/api/Compute.cs +++ b/src/Compute/Compute.Autorest/generated/api/Compute.cs @@ -14,14 +14,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute public partial class Compute { - /// Create or update a Shared Image Gallery. + /// Gets status of a Diagnostic operation issued for Disk Inspection. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - /// dots and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the create or update Shared Image Gallery operation. + /// The name of the Azure region. + /// The ID of an ongoing async operation. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -29,9 +28,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticOperationsRead(string subscriptionId, string location, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39,10 +38,10 @@ public partial class Compute var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Compute/galleries/" - + global::System.Uri.EscapeDataString(galleryName) + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnosticOperations/" + + global::System.Uri.EscapeDataString(operationId) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -51,23 +50,19 @@ public partial class Compute // 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.Compute.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DiagnosticOperationsRead_Call(request,onOk,onAccepted,onDefault,eventListener,sender); } } - /// Create or update a Shared Image Gallery. + /// Gets status of a Diagnostic operation issued for Disk Inspection. /// - /// Parameters supplied to the create or update Shared Image Gallery operation. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -75,32 +70,32 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticOperationsReadViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-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/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/diagnosticOperations/(?[^/]+)$", 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.Compute/galleries/{galleryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnosticOperations/{operationId}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var galleryName = _match.Groups["galleryName"].Value; + var location = _match.Groups["location"].Value; + var operationId = _match.Groups["operationId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Compute/galleries/" - + galleryName + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnosticOperations/" + + operationId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -109,22 +104,19 @@ public partial class Compute // 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.Compute.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DiagnosticOperationsRead_Call(request,onOk,onAccepted,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 202 (Accepted). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -132,7 +124,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiagnosticOperationsRead_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -143,105 +135,6 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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: default - 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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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.Compute.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -249,13 +142,19 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsOperationResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -271,38 +170,34 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with - /// dots and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the create or update Shared Image Gallery operation. + /// The name of the Azure region. + /// The ID of an ongoing async operation. /// 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 GalleriesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiagnosticOperationsRead_Validate(string subscriptionId, string location, string operationId, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertMinimumLength(nameof(operationId),operationId,1); } } - /// Delete a Shared Image Gallery. + /// Lists all available Compute diagnostics for a subscription in a location. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Image Gallery to be deleted. + /// The name of the Azure region. /// 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. @@ -310,9 +205,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesDelete(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticsList(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -320,10 +215,9 @@ public partial class Compute var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Compute/galleries/" - + global::System.Uri.EscapeDataString(galleryName) + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnostics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -332,19 +226,18 @@ public partial class Compute // 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.Compute.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DiagnosticsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Delete a Shared Image Gallery. + /// Lists all available Compute diagnostics for a subscription in a location. /// /// 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. @@ -352,32 +245,30 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticsListViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-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/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/diagnostics$", 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.Compute/galleries/{galleryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var galleryName = _match.Groups["galleryName"].Value; + var location = _match.Groups["location"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Compute/galleries/" - + galleryName + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnostics" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -386,19 +277,18 @@ public partial class Compute // 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.Compute.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DiagnosticsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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. @@ -406,7 +296,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiagnosticsList_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -417,48 +307,218 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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: default - 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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // 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"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } - 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.Compute.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the Azure region. + /// 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 DiagnosticsList_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Creates a request for executing disk Inspection. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the Azure region. + /// RunDiskInspection object supplied in the body of the Post run disk inspection 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.Compute.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 DiskInspectionCreate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnostics/diskInspection/run" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DiskInspectionCreate_Call(request,onDefault,eventListener,sender); + } + } + + /// Creates a request for executing disk Inspection. + /// + /// RunDiskInspection object supplied in the body of the Post run disk inspection 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.Compute.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 DiskInspectionCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.Compute/locations/(?[^/]+)/diagnostics/diskInspection/run$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/run'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnostics/diskInspection/run" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DiskInspectionCreate_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.Compute.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 DiskInspectionCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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.Compute.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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 { @@ -503,40 +563,25 @@ public partial class Compute continue; } // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get); + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get); - // drop the old response - _response?.Dispose(); + // drop the old response + _response?.Dispose(); - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -552,34 +597,33 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Image Gallery to be deleted. + /// The name of the Azure region. + /// RunDiskInspection object supplied in the body of the Post run disk inspection operation. /// 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 GalleriesDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiskInspectionCreate_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Retrieves information about a Shared Image Gallery. + /// Gets a specific Compute diagnostic for a subscription in a location. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Image Gallery. - /// The select expression to apply on the operation. - /// The expand query option to apply on the operation. + /// The name of the Azure region. /// 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). @@ -588,9 +632,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesGet(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiskInspectionGet(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -598,16 +642,11 @@ public partial class Compute var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Compute/galleries/" - + global::System.Uri.EscapeDataString(galleryName) + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnostics/diskInspection" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) - + "&" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -619,14 +658,12 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DiskInspectionGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Retrieves information about a Shared Image Gallery. + /// Gets a specific Compute diagnostic for a subscription in a location. /// - /// The select expression to apply on the operation. - /// The expand query option to apply on the 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). @@ -635,38 +672,32 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiskInspectionGetViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-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/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/diagnostics/diskInspection$", 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.Compute/galleries/{galleryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var galleryName = _match.Groups["galleryName"].Value; + var location = _match.Groups["location"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Compute/galleries/" - + galleryName + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnostics/diskInspection" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) - + "&" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -678,11 +709,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DiskInspectionGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -692,7 +723,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiskInspectionGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -710,13 +741,13 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -732,76 +763,31 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Image Gallery. - /// The select expression to apply on the operation. - /// The expand query option to apply on the operation. + /// The name of the Azure region. /// 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 GalleriesGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiskInspectionGet_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(Select),Select); - await eventListener.AssertEnum(nameof(Select),Select,@"Permissions"); - await eventListener.AssertNotNull(nameof(Expand),Expand); - await eventListener.AssertEnum(nameof(Expand),Expand,@"SharingProfile/Groups"); - } - } - - /// List galleries under a subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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.Compute.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 GalleriesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-01-03"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.Compute/galleries" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.GalleriesList_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); } } - /// List galleries under a resource group. + /// Register a storageAccount for a subscription used for DiskInspection /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// The name of the Azure region. + /// Storage Configuration object supplied in the body of the Post to cache storageAccount for a given 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). @@ -810,9 +796,9 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListByResourceGroup(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiskInspectionStorageConfigurationRegister(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -820,9 +806,9 @@ public partial class Compute var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Compute/galleries" + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnostics/diskInspection/registerStorageConfiguration" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -831,17 +817,22 @@ public partial class Compute // 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.Compute.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DiskInspectionStorageConfigurationRegister_Call(request,onOk,onDefault,eventListener,sender); } } - /// List galleries under a resource group. + /// Register a storageAccount for a subscription used for DiskInspection /// + /// Storage Configuration object supplied in the body of the Post to cache storageAccount for a given 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). @@ -850,30 +841,30 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListByResourceGroupViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiskInspectionStorageConfigurationRegisterViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-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/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/diagnostics/diskInspection/registerStorageConfiguration$", 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.Compute/galleries'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/registerStorageConfiguration'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var location = _match.Groups["location"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Compute/galleries" + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnostics/diskInspection/registerStorageConfiguration" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -882,16 +873,22 @@ public partial class Compute // 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.Compute.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DiskInspectionStorageConfigurationRegister_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// 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 @@ -901,7 +898,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesListByResourceGroup_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiskInspectionStorageConfigurationRegister_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -919,13 +916,13 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -941,26 +938,76 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// The name of the Azure region. + /// Storage Configuration object supplied in the body of the Post to cache storageAccount for a given 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 GalleriesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiskInspectionStorageConfigurationRegister_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// List galleries under a subscription. + /// + /// Validate if a storageAccount configuration exists for a subscription used for DiskInspection. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the Azure region. + /// 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.Compute.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 DiskInspectionStorageConfigurationValidate(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnostics/diskInspection/validateStorageConfiguration" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DiskInspectionStorageConfigurationValidate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Validate if a storageAccount configuration exists for a subscription used for DiskInspection. + /// /// /// 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 @@ -970,27 +1017,30 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiskInspectionStorageConfigurationValidateViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-03"; + var apiVersion = @"2024-03-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.Compute/galleries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/locations/(?[^/]+)/diagnostics/diskInspection/validateStorageConfiguration$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/validateStorageConfiguration'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.Compute/galleries" + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnostics/diskInspection/validateStorageConfiguration" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -999,16 +1049,18 @@ public partial class Compute // 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.Compute.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesList_Call(request,onOk,onDefault,eventListener,sender); + await this.DiskInspectionStorageConfigurationValidate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// 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 @@ -1018,7 +1070,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesList_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiskInspectionStorageConfigurationValidate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1036,13 +1088,13 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1058,30 +1110,33 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// The name of the Azure region. /// 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 GalleriesList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiskInspectionStorageConfigurationValidate_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); } } - /// Update a Shared Image Gallery. + /// Create or update a Shared Image Gallery. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with /// dots and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the update Shared Image Gallery operation. + /// Parameters supplied to the create or update Shared Image Gallery 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). @@ -1090,7 +1145,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -1112,7 +1167,7 @@ public partial class Compute // 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.Compute.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -1121,13 +1176,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update a Shared Image Gallery. + /// Create or update a Shared Image Gallery. /// - /// Parameters supplied to the update Shared Image Gallery operation. + /// Parameters supplied to the create or update Shared Image Gallery 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). @@ -1136,7 +1191,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -1170,7 +1225,7 @@ public partial class Compute // 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.Compute.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -1179,11 +1234,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -1193,7 +1248,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1332,20 +1387,20 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with /// dots and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the update Shared Image Gallery operation. + /// Parameters supplied to the create or update Shared Image Gallery operation. /// 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 GalleriesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGallery body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1357,18 +1412,13 @@ public partial class Compute } } - /// Create or update a gallery Application Version. + /// Delete a Shared Image Gallery. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version is - /// to be created. - /// The name of the gallery Application Version to be created. Needs to follow - /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit - /// integer. Format: .. - /// Parameters supplied to the create or update gallery Application Version operation. + /// The name of the Shared Image Gallery to be deleted. /// 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. @@ -1376,7 +1426,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesDelete(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -1390,10 +1440,6 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/applications/" - + global::System.Uri.EscapeDataString(galleryApplicationName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1402,23 +1448,19 @@ public partial class Compute // 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.Compute.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Create or update a gallery Application Version. + /// Delete a Shared Image Gallery. /// - /// Parameters supplied to the create or update gallery Application Version operation. /// 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. @@ -1426,7 +1468,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -1434,18 +1476,16 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; - var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -1454,10 +1494,6 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/applications/" - + galleryApplicationName - + "/versions/" - + galleryApplicationVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1466,24 +1502,19 @@ public partial class Compute // 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.Compute.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// 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. @@ -1491,7 +1522,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1505,6 +1536,7 @@ public partial class Compute // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: default + 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 ) @@ -1587,10 +1619,10 @@ public partial class Compute continue; } // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) + if (!string.IsNullOrWhiteSpace(_finalUri)) { // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -1608,13 +1640,19 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); break; } - default: + case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1630,46 +1668,35 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version is - /// to be created. - /// The name of the gallery Application Version to be created. Needs to follow - /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit - /// integer. Format: .. - /// Parameters supplied to the create or update gallery Application Version operation. + /// The name of the Shared Image Gallery to be deleted. /// 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 GalleryApplicationVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); - await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Delete a gallery Application Version. + /// Retrieves information about a Shared Image Gallery. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version resides. - /// The name of the gallery Application Version to be deleted. + /// The name of the Shared Image Gallery. + /// The select expression to apply on the operation. + /// The expand query option to apply on the operation. /// 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. @@ -1677,7 +1704,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesGet(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -1691,31 +1718,32 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/applications/" - + global::System.Uri.EscapeDataString(galleryApplicationName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Delete a gallery Application Version. + /// Retrieves information about a Shared Image Gallery. /// + /// The select expression to apply on the operation. + /// The expand query option to apply on the operation. /// 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. @@ -1723,7 +1751,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -1731,18 +1759,16 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; - var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -1751,31 +1777,30 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/applications/" - + galleryApplicationName - + "/versions/" - + galleryApplicationVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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. @@ -1783,7 +1808,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1794,106 +1819,6 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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: default - 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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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.Compute.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1901,13 +1826,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1929,39 +1848,36 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version resides. - /// The name of the gallery Application Version to be deleted. + /// The name of the Shared Image Gallery. + /// The select expression to apply on the operation. + /// The expand query option to apply on the operation. /// 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 GalleryApplicationVersionsDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.SelectPermissions? Select, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryExpandParams? Expand, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); - await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); + await eventListener.AssertNotNull(nameof(Select),Select); + await eventListener.AssertEnum(nameof(Select),Select,@"Permissions"); + await eventListener.AssertNotNull(nameof(Expand),Expand); + await eventListener.AssertEnum(nameof(Expand),Expand,@"SharingProfile/Groups"); } } - /// Retrieves information about a gallery Application Version. + /// List galleries under a subscription. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version resides. - /// The name of the gallery Application Version to be retrieved. - /// The expand expression to apply on the 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). @@ -1970,7 +1886,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -1980,17 +1896,8 @@ public partial class Compute var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Compute/galleries/" - + global::System.Uri.EscapeDataString(galleryName) - + "/applications/" - + global::System.Uri.EscapeDataString(galleryApplicationName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + + "/providers/Microsoft.Compute/galleries" + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2003,13 +1910,14 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Retrieves information about a gallery Application Version. - /// - /// The expand expression to apply on the operation. + /// List galleries under a resource group. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the 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). @@ -2018,41 +1926,20 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesListByResourceGroup(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // 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.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var galleryName = _match.Groups["galleryName"].Value; - var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; - var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Compute/galleries/" - + galleryName - + "/applications/" - + galleryApplicationName - + "/versions/" - + galleryApplicationVersionName + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Compute/galleries" + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2065,11 +1952,62 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// List galleries under a 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.Compute.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 GalleriesListByResourceGroupViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries$", 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.Compute/galleries'"); + } + + // 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.Compute/galleries" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleriesListByResourceGroup_Call(request,onOk,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 default (any response code not handled @@ -2079,7 +2017,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesListByResourceGroup_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2097,7 +2035,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2119,84 +2057,26 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version resides. - /// The name of the gallery Application Version to be retrieved. - /// The expand expression to apply on the operation. /// 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 GalleryApplicationVersionsGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); - await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); - await eventListener.AssertNotNull(nameof(Expand),Expand); - await eventListener.AssertEnum(nameof(Expand),Expand,@"ReplicationStatus"); - } - } - - /// List gallery Application Versions in a gallery Application Definition. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the Shared Application Gallery Application Definition from which the - /// Application Versions are to be listed. - /// 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.Compute.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 GalleryApplicationVersionsListByGalleryApplication(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-01-03"; - // 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.Compute/galleries/" - + global::System.Uri.EscapeDataString(galleryName) - + "/applications/" - + global::System.Uri.EscapeDataString(galleryApplicationName) - + "/versions" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.GalleryApplicationVersionsListByGalleryApplication_Call(request,onOk,onDefault,eventListener,sender); } } - /// List gallery Application Versions in a gallery Application Definition. + /// List galleries under 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 @@ -2206,7 +2086,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplicationViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesListViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -2214,28 +2094,19 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Compute/galleries$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var galleryName = _match.Groups["galleryName"].Value; - var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Compute/galleries/" - + galleryName - + "/applications/" - + galleryApplicationName - + "/versions" + + "/providers/Microsoft.Compute/galleries" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2249,13 +2120,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsListByGalleryApplication_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesList_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// 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 @@ -2265,7 +2134,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesList_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2283,7 +2152,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2305,41 +2174,30 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual - /// call, but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the Shared Application Gallery Application Definition from which the - /// Application Versions are to be listed. /// 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 GalleryApplicationVersionsListByGalleryApplication_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); } } - /// Update a gallery Application Version. + /// Update a Shared Image Gallery. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version is - /// to be updated. - /// The name of the gallery Application Version to be updated. Needs to follow - /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit - /// integer. Format: .. - /// Parameters supplied to the update gallery Application Version operation. + /// The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with + /// dots and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update Shared Image Gallery 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). @@ -2348,7 +2206,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -2362,10 +2220,6 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/applications/" - + global::System.Uri.EscapeDataString(galleryApplicationName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2383,13 +2237,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update a gallery Application Version. + /// Update a Shared Image Gallery. /// - /// Parameters supplied to the update gallery Application Version operation. + /// Parameters supplied to the update Shared Image Gallery 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). @@ -2398,7 +2252,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -2406,18 +2260,16 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; - var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2426,10 +2278,6 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/applications/" - + galleryApplicationName - + "/versions/" - + galleryApplicationVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2447,11 +2295,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -2461,7 +2309,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2578,7 +2426,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2600,45 +2448,42 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition resides. - /// The name of the gallery Application Definition in which the Application Version is - /// to be updated. - /// The name of the gallery Application Version to be updated. Needs to follow - /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit - /// integer. Format: .. - /// Parameters supplied to the update gallery Application Version operation. + /// The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with + /// dots and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update Shared Image Gallery operation. /// 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 GalleryApplicationVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); - await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Create or update a gallery Application Definition. + /// Create or update a gallery Application Version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition is to be created. - /// The name of the gallery Application Definition to be created or updated. The allowed - /// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the create or update gallery Application operation. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version is + /// to be created. + /// The name of the gallery Application Version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit + /// integer. Format: .. + /// Parameters supplied to the create or update gallery Application Version 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). @@ -2647,7 +2492,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -2663,6 +2508,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/applications/" + global::System.Uri.EscapeDataString(galleryApplicationName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2680,13 +2527,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Create or update a gallery Application Definition. + /// Create or update a gallery Application Version. /// - /// Parameters supplied to the create or update gallery Application operation. + /// Parameters supplied to the create or update gallery Application Version 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). @@ -2695,7 +2542,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -2703,10 +2550,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); } // replace URI parameters with values from identity @@ -2714,6 +2561,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; + var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2724,6 +2572,8 @@ public partial class Compute + galleryName + "/applications/" + galleryApplicationName + + "/versions/" + + galleryApplicationVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2741,11 +2591,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// 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 @@ -2755,7 +2607,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2872,7 +2724,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2894,21 +2746,24 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition is to be created. - /// The name of the gallery Application Definition to be created or updated. The allowed - /// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the create or update gallery Application operation. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version is + /// to be created. + /// The name of the gallery Application Version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit + /// integer. Format: .. + /// Parameters supplied to the create or update gallery Application Version operation. /// 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 GalleryApplicationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2916,17 +2771,19 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); + await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Delete a gallery Application. + /// Delete a gallery Application Version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition is to be deleted. - /// The name of the gallery Application Definition to be deleted. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version resides. + /// The name of the gallery Application Version to be deleted. /// 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 @@ -2936,7 +2793,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -2952,6 +2809,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/applications/" + global::System.Uri.EscapeDataString(galleryApplicationName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2965,11 +2824,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Delete a gallery Application. + /// Delete a gallery Application Version. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -2980,7 +2839,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -2988,10 +2847,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); } // replace URI parameters with values from identity @@ -2999,6 +2858,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; + var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3009,6 +2869,8 @@ public partial class Compute + galleryName + "/applications/" + galleryApplicationName + + "/versions/" + + galleryApplicationVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3022,11 +2884,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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). @@ -3037,7 +2899,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3183,19 +3045,20 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition is to be deleted. - /// The name of the gallery Application Definition to be deleted. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version resides. + /// The name of the gallery Application Version to be deleted. /// 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 GalleryApplicationsDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3203,16 +3066,18 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); + await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); } } - /// Retrieves information about a gallery Application Definition. + /// Retrieves information about a gallery Application Version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery from which the Application Definitions are to be - /// retrieved. - /// The name of the gallery Application Definition to be retrieved. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version resides. + /// The name of the gallery Application Version to be retrieved. + /// The expand expression to apply on the 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). @@ -3221,7 +3086,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3237,7 +3102,11 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/applications/" + global::System.Uri.EscapeDataString(galleryApplicationName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3250,12 +3119,13 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Retrieves information about a gallery Application Definition. + /// Retrieves information about a gallery Application Version. /// + /// The expand expression to apply on the 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). @@ -3264,7 +3134,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsGetViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3272,10 +3142,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); } // replace URI parameters with values from identity @@ -3283,6 +3153,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; + var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3293,7 +3164,11 @@ public partial class Compute + galleryName + "/applications/" + galleryApplicationName + + "/versions/" + + galleryApplicationVersionName + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3306,11 +3181,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -3320,7 +3195,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3338,7 +3213,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3360,20 +3235,21 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery from which the Application Definitions are to be - /// retrieved. - /// The name of the gallery Application Definition to be retrieved. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version resides. + /// The name of the gallery Application Version to be retrieved. + /// The expand expression to apply on the operation. /// 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 GalleryApplicationsGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3381,14 +3257,19 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); + await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); + await eventListener.AssertNotNull(nameof(Expand),Expand); + await eventListener.AssertEnum(nameof(Expand),Expand,@"ReplicationStatus"); } } - /// List gallery Application Definitions in a gallery. + /// List gallery Application Versions in a gallery Application Definition. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery from which Application Definitions are to be listed. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the Shared Application Gallery Application Definition from which the + /// Application Versions are to be listed. /// 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). @@ -3397,7 +3278,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3411,7 +3292,9 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/applications" + + "/applications/" + + global::System.Uri.EscapeDataString(galleryApplicationName) + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3425,11 +3308,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsListByGallery_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsListByGalleryApplication_Call(request,onOk,onDefault,eventListener,sender); } } - /// List gallery Application Definitions in a gallery. + /// List gallery Application Versions in a gallery Application Definition. /// /// 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 @@ -3439,7 +3322,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsListByGalleryViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplicationViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3447,16 +3330,17 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions$", 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.Compute/galleries/{galleryName}/applications'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; + var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3465,7 +3349,9 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/applications" + + "/applications/" + + galleryApplicationName + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3479,11 +3365,13 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsListByGallery_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsListByGalleryApplication_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// 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 @@ -3493,7 +3381,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3511,7 +3399,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3533,35 +3421,41 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery from which Application Definitions are to be listed. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the Shared Application Gallery Application Definition from which the + /// Application Versions are to be listed. /// 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 GalleryApplicationsListByGallery_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsListByGalleryApplication_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); } } - /// Update a gallery Application Definition. + /// Update a gallery Application Version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition is to be updated. - /// The name of the gallery Application Definition to be updated. The allowed characters - /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the update gallery Application operation. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version is + /// to be updated. + /// The name of the gallery Application Version to be updated. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit + /// integer. Format: .. + /// Parameters supplied to the update gallery Application Version 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). @@ -3570,7 +3464,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3586,6 +3480,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/applications/" + global::System.Uri.EscapeDataString(galleryApplicationName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryApplicationVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3603,13 +3499,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update a gallery Application Definition. + /// Update a gallery Application Version. /// - /// Parameters supplied to the update gallery Application operation. + /// Parameters supplied to the update gallery Application Version 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). @@ -3618,7 +3514,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryApplicationsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3626,10 +3522,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}'"); } // replace URI parameters with values from identity @@ -3637,6 +3533,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; + var galleryApplicationVersionName = _match.Groups["galleryApplicationVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3647,6 +3544,8 @@ public partial class Compute + galleryName + "/applications/" + galleryApplicationName + + "/versions/" + + galleryApplicationVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3664,11 +3563,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryApplicationsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -3678,7 +3577,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryApplicationsUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3795,7 +3694,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3817,21 +3716,24 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Application Gallery in which the Application Definition is to be updated. - /// The name of the gallery Application Definition to be updated. The allowed characters - /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the update gallery Application operation. + /// The name of the Shared Application Gallery in which the Application Definition resides. + /// The name of the gallery Application Definition in which the Application Version is + /// to be updated. + /// The name of the gallery Application Version to be updated. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit + /// integer. Format: .. + /// Parameters supplied to the update gallery Application Version operation. /// 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 GalleryApplicationsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3839,21 +3741,20 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); + await eventListener.AssertNotNull(nameof(galleryApplicationVersionName),galleryApplicationVersionName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Create or update a gallery image version. + /// Create or update a gallery Application Definition. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version is to be created. - /// The name of the gallery image version to be created. Needs to follow semantic version - /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: - /// .. - /// Parameters supplied to the create or update gallery image version operation. + /// The name of the Shared Application Gallery in which the Application Definition is to be created. + /// The name of the gallery Application Definition to be created or updated. The allowed + /// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery Application 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). @@ -3862,7 +3763,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3876,11 +3777,9 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/images/" - + global::System.Uri.EscapeDataString(galleryImageName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryImageVersionName) - + "?" + + "/applications/" + + global::System.Uri.EscapeDataString(galleryApplicationName) + + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3897,13 +3796,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Create or update a gallery image version. + /// Create or update a gallery Application Definition. /// - /// Parameters supplied to the create or update gallery image version operation. + /// Parameters supplied to the create or update gallery Application 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). @@ -3912,7 +3811,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -3920,18 +3819,17 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryImageName = _match.Groups["galleryImageName"].Value; - var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; + var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3940,10 +3838,8 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/images/" - + galleryImageName - + "/versions/" - + galleryImageVersionName + + "/applications/" + + galleryApplicationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3961,11 +3857,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -3975,7 +3871,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4092,7 +3988,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4114,43 +4010,39 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you + /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version is to be created. - /// The name of the gallery image version to be created. Needs to follow semantic version - /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: - /// .. - /// Parameters supplied to the create or update gallery image version operation. + /// The name of the Shared Application Gallery in which the Application Definition is to be created. + /// The name of the gallery Application Definition to be created or updated. The allowed + /// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery Application operation. /// 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 GalleryImageVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); - await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); + await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Delete a gallery image version. + /// Delete a gallery Application. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version resides. - /// The name of the gallery image version to be deleted. + /// The name of the Shared Application Gallery in which the Application Definition is to be deleted. + /// The name of the gallery Application Definition to be deleted. /// 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 @@ -4160,7 +4052,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4174,10 +4066,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/images/" - + global::System.Uri.EscapeDataString(galleryImageName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryImageVersionName) + + "/applications/" + + global::System.Uri.EscapeDataString(galleryApplicationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4191,11 +4081,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleryApplicationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Delete a gallery image version. + /// Delete a gallery Application. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -4206,7 +4096,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4214,18 +4104,17 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryImageName = _match.Groups["galleryImageName"].Value; - var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; + var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4234,10 +4123,8 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/images/" - + galleryImageName - + "/versions/" - + galleryImageVersionName + + "/applications/" + + galleryApplicationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4251,11 +4138,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleryApplicationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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). @@ -4266,7 +4153,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4412,39 +4299,36 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version resides. - /// The name of the gallery image version to be deleted. + /// The name of the Shared Application Gallery in which the Application Definition is to be deleted. + /// The name of the gallery Application Definition to be deleted. /// 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 GalleryImageVersionsDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationsDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); - await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); + await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); } } - /// Retrieves information about a gallery image version. + /// Retrieves information about a gallery Application Definition. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version resides. - /// The name of the gallery image version to be retrieved. - /// The expand expression to apply on the operation. + /// The name of the Shared Application Gallery from which the Application Definitions are to be + /// retrieved. + /// The name of the gallery Application Definition to be retrieved. /// 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). @@ -4453,7 +4337,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4467,13 +4351,9 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/images/" - + global::System.Uri.EscapeDataString(galleryImageName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryImageVersionName) + + "/applications/" + + global::System.Uri.EscapeDataString(galleryApplicationName) + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4486,13 +4366,12 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Retrieves information about a gallery image version. + /// Retrieves information about a gallery Application Definition. /// - /// The expand expression to apply on the 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). @@ -4501,7 +4380,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsGetViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4509,18 +4388,17 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryImageName = _match.Groups["galleryImageName"].Value; - var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; + var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4529,13 +4407,9 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/images/" - + galleryImageName - + "/versions/" - + galleryImageVersionName + + "/applications/" + + galleryApplicationName + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4548,11 +4422,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -4562,7 +4436,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4580,7 +4454,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4602,41 +4476,35 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version resides. - /// The name of the gallery image version to be retrieved. - /// The expand expression to apply on the operation. + /// The name of the Shared Application Gallery from which the Application Definitions are to be + /// retrieved. + /// The name of the gallery Application Definition to be retrieved. /// 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 GalleryImageVersionsGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationsGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); - await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); - await eventListener.AssertNotNull(nameof(Expand),Expand); - await eventListener.AssertEnum(nameof(Expand),Expand,@"ReplicationStatus"); + await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); } } - /// List gallery image versions in a gallery image definition. + /// List gallery Application Definitions in a gallery. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the Shared Image Gallery Image Definition from which the Image Versions are - /// to be listed. + /// The name of the Shared Application Gallery from which Application Definitions are to be listed. /// 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). @@ -4645,7 +4513,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4659,9 +4527,7 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/images/" - + global::System.Uri.EscapeDataString(galleryImageName) - + "/versions" + + "/applications" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4675,11 +4541,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsListByGalleryImage_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsListByGallery_Call(request,onOk,onDefault,eventListener,sender); } } - /// List gallery image versions in a gallery image definition. + /// List gallery Application Definitions in a gallery. /// /// 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 @@ -4689,7 +4555,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImageViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsListByGalleryViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4697,17 +4563,16 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryImageName = _match.Groups["galleryImageName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4716,9 +4581,7 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/images/" - + galleryImageName - + "/versions" + + "/applications" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4732,13 +4595,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsListByGalleryImage_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsListByGallery_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// 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 @@ -4748,7 +4609,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4766,7 +4627,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -4788,40 +4649,35 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but - /// you will get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the Shared Image Gallery Image Definition from which the Image Versions are - /// to be listed. + /// The name of the Shared Application Gallery from which Application Definitions are to be listed. /// 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 GalleryImageVersionsListByGalleryImage_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationsListByGallery_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); } } - /// Update a gallery image version. + /// Update a gallery Application Definition. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version is to be updated. - /// The name of the gallery image version to be updated. Needs to follow semantic version - /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: - /// .. - /// Parameters supplied to the update gallery image version operation. + /// The name of the Shared Application Gallery in which the Application Definition is to be updated. + /// The name of the gallery Application Definition to be updated. The allowed characters + /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update gallery Application 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). @@ -4830,7 +4686,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4844,10 +4700,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/images/" - + global::System.Uri.EscapeDataString(galleryImageName) - + "/versions/" - + global::System.Uri.EscapeDataString(galleryImageVersionName) + + "/applications/" + + global::System.Uri.EscapeDataString(galleryApplicationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4865,13 +4719,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update a gallery image version. + /// Update a gallery Application Definition. /// - /// Parameters supplied to the update gallery image version operation. + /// Parameters supplied to the update gallery Application 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). @@ -4880,7 +4734,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryApplicationsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -4888,18 +4742,17 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/applications/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; - var galleryImageName = _match.Groups["galleryImageName"].Value; - var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; + var galleryApplicationName = _match.Groups["galleryApplicationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4908,11 +4761,9 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/images/" - + galleryImageName - + "/versions/" - + galleryImageVersionName - + "?" + + "/applications/" + + galleryApplicationName + + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4929,11 +4780,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImageVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryApplicationsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -4943,7 +4794,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryApplicationsUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5060,7 +4911,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplication.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5082,44 +4933,43 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition resides. - /// The name of the gallery image definition in which the Image Version is to be updated. - /// The name of the gallery image version to be updated. Needs to follow semantic version - /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: - /// .. - /// Parameters supplied to the update gallery image version operation. + /// The name of the Shared Application Gallery in which the Application Definition is to be updated. + /// The name of the gallery Application Definition to be updated. The allowed characters + /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update gallery Application operation. /// 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 GalleryImageVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryApplicationsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); - await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); + await eventListener.AssertNotNull(nameof(galleryApplicationName),galleryApplicationName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Create or update a gallery image definition. + /// Create or update a gallery image version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition is to be created. - /// The name of the gallery image definition to be created or updated. The allowed characters - /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the create or update gallery image operation. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version is to be created. + /// The name of the gallery image version to be created. Needs to follow semantic version + /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: + /// .. + /// Parameters supplied to the create or update gallery image version 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). @@ -5128,7 +4978,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5144,6 +4994,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/images/" + global::System.Uri.EscapeDataString(galleryImageName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryImageVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5161,13 +5013,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Create or update a gallery image definition. + /// Create or update a gallery image version. /// - /// Parameters supplied to the create or update gallery image operation. + /// Parameters supplied to the create or update gallery image version 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). @@ -5176,7 +5028,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5184,10 +5036,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); } // replace URI parameters with values from identity @@ -5195,6 +5047,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryImageName = _match.Groups["galleryImageName"].Value; + var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5205,6 +5058,8 @@ public partial class Compute + galleryName + "/images/" + galleryImageName + + "/versions/" + + galleryImageVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5222,11 +5077,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -5236,7 +5091,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5353,7 +5208,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5375,21 +5230,23 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition is to be created. - /// The name of the gallery image definition to be created or updated. The allowed characters - /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the create or update gallery image operation. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version is to be created. + /// The name of the gallery image version to be created. Needs to follow semantic version + /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: + /// .. + /// Parameters supplied to the create or update gallery image version operation. /// 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 GalleryImagesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersion body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5397,17 +5254,19 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Delete a gallery image. + /// Delete a gallery image version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition is to be deleted. - /// The name of the gallery image definition to be deleted. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version resides. + /// The name of the gallery image version to be deleted. /// 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 @@ -5417,7 +5276,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5433,6 +5292,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/images/" + global::System.Uri.EscapeDataString(galleryImageName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryImageVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5446,11 +5307,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleryImageVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Delete a gallery image. + /// Delete a gallery image version. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -5461,7 +5322,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5469,10 +5330,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); } // replace URI parameters with values from identity @@ -5480,6 +5341,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryImageName = _match.Groups["galleryImageName"].Value; + var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5490,6 +5352,8 @@ public partial class Compute + galleryName + "/images/" + galleryImageName + + "/versions/" + + galleryImageVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5503,11 +5367,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleryImageVersionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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). @@ -5518,7 +5382,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5664,19 +5528,20 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition is to be deleted. - /// The name of the gallery image definition to be deleted. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version resides. + /// The name of the gallery image version to be deleted. /// 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 GalleryImagesDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5684,15 +5549,18 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); } } - /// Retrieves information about a gallery image definition. + /// Retrieves information about a gallery image version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. - /// The name of the gallery image definition to be retrieved. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version resides. + /// The name of the gallery image version to be retrieved. + /// The expand expression to apply on the 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). @@ -5701,7 +5569,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5717,7 +5585,11 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/images/" + global::System.Uri.EscapeDataString(galleryImageName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryImageVersionName) + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5730,12 +5602,13 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Retrieves information about a gallery image definition. + /// Retrieves information about a gallery image version. /// + /// The expand expression to apply on the 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). @@ -5744,7 +5617,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesGetViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5752,10 +5625,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); } // replace URI parameters with values from identity @@ -5763,6 +5636,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryImageName = _match.Groups["galleryImageName"].Value; + var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5773,7 +5647,11 @@ public partial class Compute + galleryName + "/images/" + galleryImageName + + "/versions/" + + galleryImageVersionName + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5786,11 +5664,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -5800,7 +5678,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5818,7 +5696,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5840,19 +5718,21 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. - /// The name of the gallery image definition to be retrieved. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version resides. + /// The name of the gallery image version to be retrieved. + /// The expand expression to apply on the operation. /// 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 GalleryImagesGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes? Expand, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5860,14 +5740,19 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); + await eventListener.AssertNotNull(nameof(Expand),Expand); + await eventListener.AssertEnum(nameof(Expand),Expand,@"ReplicationStatus"); } } - /// List gallery image definitions in a gallery. + /// List gallery image versions in a gallery image definition. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery from which Image Definitions are to be listed. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the Shared Image Gallery Image Definition from which the Image Versions are + /// to be listed. /// 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). @@ -5876,7 +5761,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5890,7 +5775,9 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/images" + + "/images/" + + global::System.Uri.EscapeDataString(galleryImageName) + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5904,11 +5791,11 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesListByGallery_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsListByGalleryImage_Call(request,onOk,onDefault,eventListener,sender); } } - /// List gallery image definitions in a gallery. + /// List gallery image versions in a gallery image definition. /// /// 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 @@ -5918,7 +5805,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesListByGalleryViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImageViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -5926,16 +5813,17 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions$", 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.Compute/galleries/{galleryName}/images'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; + var galleryImageName = _match.Groups["galleryImageName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5944,7 +5832,9 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/images" + + "/images/" + + galleryImageName + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5958,11 +5848,13 @@ public partial class Compute await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesListByGallery_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsListByGalleryImage_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// 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 @@ -5972,7 +5864,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesListByGallery_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5990,7 +5882,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -6012,35 +5904,40 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery from which Image Definitions are to be listed. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the Shared Image Gallery Image Definition from which the Image Versions are + /// to be listed. /// 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 GalleryImagesListByGallery_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsListByGalleryImage_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); } } - /// Update a gallery image definition. + /// Update a gallery image version. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition is to be updated. - /// The name of the gallery image definition to be updated. The allowed characters are alphabets - /// and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the update gallery image operation. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version is to be updated. + /// The name of the gallery image version to be updated. Needs to follow semantic version + /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: + /// .. + /// Parameters supplied to the update gallery image version 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). @@ -6049,7 +5946,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -6065,6 +5962,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(galleryName) + "/images/" + global::System.Uri.EscapeDataString(galleryImageName) + + "/versions/" + + global::System.Uri.EscapeDataString(galleryImageVersionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6082,13 +5981,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update a gallery image definition. + /// Update a gallery image version. /// - /// Parameters supplied to the update gallery image operation. + /// Parameters supplied to the update gallery image version 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). @@ -6097,7 +5996,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleryImagesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImageVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -6105,10 +6004,10 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", 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.Compute/galleries/{galleryName}/images/{galleryImageName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'"); } // replace URI parameters with values from identity @@ -6116,6 +6015,7 @@ public partial class Compute var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; var galleryImageName = _match.Groups["galleryImageName"].Value; + var galleryImageVersionName = _match.Groups["galleryImageVersionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6126,6 +6026,8 @@ public partial class Compute + galleryName + "/images/" + galleryImageName + + "/versions/" + + galleryImageVersionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6143,11 +6045,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleryImagesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImageVersionsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -6157,7 +6059,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleryImagesUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6274,7 +6176,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -6296,21 +6198,23 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery in which the Image Definition is to be updated. - /// The name of the gallery image definition to be updated. The allowed characters are alphabets - /// and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - /// Parameters supplied to the update gallery image operation. + /// The name of the Shared Image Gallery in which the Image Definition resides. + /// The name of the gallery image definition in which the Image Version is to be updated. + /// The name of the gallery image version to be updated. Needs to follow semantic version + /// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: + /// .. + /// Parameters supplied to the update gallery image version operation. /// 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 GalleryImagesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImageVersionsUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6318,17 +6222,20 @@ public partial class Compute await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + await eventListener.AssertNotNull(nameof(galleryImageVersionName),galleryImageVersionName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Update sharing profile of a gallery. + /// Create or update a gallery image definition. /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery. - /// Parameters supplied to the update gallery sharing profile. + /// The name of the Shared Image Gallery in which the Image Definition is to be created. + /// The name of the gallery image definition to be created or updated. The allowed characters + /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery image 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). @@ -6337,7 +6244,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GallerySharingProfileUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -6351,7 +6258,8 @@ public partial class Compute + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Compute/galleries/" + global::System.Uri.EscapeDataString(galleryName) - + "/share" + + "/images/" + + global::System.Uri.EscapeDataString(galleryImageName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6360,7 +6268,7 @@ public partial class Compute // 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.Compute.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6369,13 +6277,13 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GallerySharingProfileUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImagesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update sharing profile of a gallery. + /// Create or update a gallery image definition. /// - /// Parameters supplied to the update gallery sharing profile. + /// Parameters supplied to the create or update gallery image 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). @@ -6384,7 +6292,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GallerySharingProfileUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-03"; // Constant Parameters @@ -6392,16 +6300,17 @@ public partial class Compute { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/share$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Compute/galleries/(?[^/]+)/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.Compute/galleries/{galleryName}/share'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var galleryName = _match.Groups["galleryName"].Value; + var galleryImageName = _match.Groups["galleryImageName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6410,7 +6319,8 @@ public partial class Compute + resourceGroupName + "/providers/Microsoft.Compute/galleries/" + galleryName - + "/share" + + "/images/" + + galleryImageName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6419,7 +6329,7 @@ public partial class Compute // 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.Compute.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6428,11 +6338,11 @@ public partial class Compute request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GallerySharingProfileUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleryImagesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// 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 @@ -6442,7 +6352,7 @@ public partial class Compute /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GallerySharingProfileUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6456,7 +6366,6 @@ public partial class Compute // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: default - 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 ) @@ -6539,10 +6448,10 @@ public partial class Compute continue; } // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) + if (!string.IsNullOrWhiteSpace(_originalUri)) { // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -6560,7 +6469,7 @@ public partial class Compute case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingUpdate.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -6582,25 +6491,1571 @@ public partial class Compute } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// The name of the resource group. - /// The name of the Shared Image Gallery. - /// Parameters supplied to the update gallery sharing profile. + /// The name of the Shared Image Gallery in which the Image Definition is to be created. + /// The name of the gallery image definition to be created or updated. The allowed characters + /// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery image operation. /// 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 GallerySharingProfileUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleryImagesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImage body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a gallery image. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the Image Definition is to be deleted. + /// The name of the gallery image definition to be deleted. + /// 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.Compute.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 GalleryImagesDelete(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + + "/images/" + + global::System.Uri.EscapeDataString(galleryImageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a gallery 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.Compute.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 GalleryImagesDeleteViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/(?[^/]+)/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.Compute/galleries/{galleryName}/images/{galleryImageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var galleryName = _match.Groups["galleryName"].Value; + var galleryImageName = _match.Groups["galleryImageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Compute/galleries/" + + galleryName + + "/images/" + + galleryImageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesDelete_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.Compute.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 GalleryImagesDelete_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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: default + 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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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.Compute.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the Image Definition is to be deleted. + /// The name of the gallery image definition to be deleted. + /// 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 GalleryImagesDelete_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + } + } + + /// Retrieves information about a gallery image definition. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. + /// The name of the gallery image definition to be retrieved. + /// 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.Compute.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 GalleryImagesGet(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + + "/images/" + + global::System.Uri.EscapeDataString(galleryImageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Retrieves information about a gallery image definition. + /// + /// 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.Compute.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 GalleryImagesGetViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/(?[^/]+)/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.Compute/galleries/{galleryName}/images/{galleryImageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var galleryName = _match.Groups["galleryName"].Value; + var galleryImageName = _match.Groups["galleryImageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Compute/galleries/" + + galleryName + + "/images/" + + galleryImageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesGet_Call(request,onOk,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 default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Compute.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 GalleryImagesGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.ResponseCreated, _response); 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.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. + /// The name of the gallery image definition to be retrieved. + /// 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 GalleryImagesGet_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + } + } + + /// List gallery image definitions in a gallery. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which Image Definitions are to be listed. + /// 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.Compute.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 GalleryImagesListByGallery(string subscriptionId, string resourceGroupName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + + "/images" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesListByGallery_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List gallery image definitions in a gallery. + /// + /// 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.Compute.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 GalleryImagesListByGalleryViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/(?[^/]+)/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.Compute/galleries/{galleryName}/images'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var galleryName = _match.Groups["galleryName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Compute/galleries/" + + galleryName + + "/images" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesListByGallery_Call(request,onOk,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 default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Compute.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 GalleryImagesListByGallery_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.ResponseCreated, _response); 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.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which Image Definitions are to be listed. + /// 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 GalleryImagesListByGallery_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + } + } + + /// Update a gallery image definition. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the Image Definition is to be updated. + /// The name of the gallery image definition to be updated. The allowed characters are alphabets + /// and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update gallery image 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.Compute.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 GalleryImagesUpdate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + + "/images/" + + global::System.Uri.EscapeDataString(galleryImageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a gallery image definition. + /// + /// Parameters supplied to the update gallery image 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.Compute.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 GalleryImagesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/(?[^/]+)/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.Compute/galleries/{galleryName}/images/{galleryImageName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var galleryName = _match.Groups["galleryName"].Value; + var galleryImageName = _match.Groups["galleryImageName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Compute/galleries/" + + galleryName + + "/images/" + + galleryImageName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GalleryImagesUpdate_Call(request,onOk,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 default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Compute.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 GalleryImagesUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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: default + 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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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.Compute.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImage.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the Image Definition is to be updated. + /// The name of the gallery image definition to be updated. The allowed characters are alphabets + /// and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update gallery image operation. + /// 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 GalleryImagesUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryImageName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(galleryImageName),galleryImageName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update sharing profile of a gallery. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery. + /// Parameters supplied to the update gallery sharing profile. + /// 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.Compute.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 GallerySharingProfileUpdate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + + "/share" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GallerySharingProfileUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update sharing profile of a gallery. + /// + /// Parameters supplied to the update gallery sharing profile. + /// 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.Compute.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 GallerySharingProfileUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-03"; + // 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.Compute/galleries/(?[^/]+)/share$", 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.Compute/galleries/{galleryName}/share'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var galleryName = _match.Groups["galleryName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Compute/galleries/" + + galleryName + + "/share" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GallerySharingProfileUpdate_Call(request,onOk,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 default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Compute.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 GallerySharingProfileUpdate_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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: default + 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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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.Compute.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.SharingUpdate.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery. + /// Parameters supplied to the update gallery sharing profile. + /// 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 GallerySharingProfileUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISharingUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Gets Spot Placement Recommender diagnostic metadata. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the Azure region. + /// 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.Compute.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 SpotPlacementRecommenderGet(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnostics/spotPlacementRecommender" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SpotPlacementRecommenderGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets Spot Placement Recommender diagnostic metadata. + /// + /// 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.Compute.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 SpotPlacementRecommenderGetViaIdentity(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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.Compute/locations/(?[^/]+)/diagnostics/spotPlacementRecommender$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnostics/spotPlacementRecommender" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SpotPlacementRecommenderGet_Call(request,onOk,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 default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Compute.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 SpotPlacementRecommenderGet_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.ResponseCreated, _response); 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.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the Azure region. + /// 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 SpotPlacementRecommenderGet_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Generates placement scores for Spot VM skus. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the Azure region. + /// SpotPlacementRecommender object supplied in the body of the Post spot placement recommender 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.Compute.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 SpotPlacementRecommenderPost(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Compute/locations/" + + global::System.Uri.EscapeDataString(location) + + "/diagnostics/spotPlacementRecommender/generate" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SpotPlacementRecommenderPost_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Generates placement scores for Spot VM skus. + /// + /// SpotPlacementRecommender object supplied in the body of the Post spot placement recommender 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.Compute.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 SpotPlacementRecommenderPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.Compute/locations/(?[^/]+)/diagnostics/spotPlacementRecommender/generate$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Compute/locations/" + + location + + "/diagnostics/spotPlacementRecommender/generate" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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.Compute.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SpotPlacementRecommenderPost_Call(request,onOk,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 default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Compute.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 SpotPlacementRecommenderPost_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.Compute.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.ResponseCreated, _response); 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.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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. + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// The name of the Azure region. + /// SpotPlacementRecommender object supplied in the body of the Post spot placement recommender operation. + /// 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 SpotPlacementRecommenderPost_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput body, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs new file mode 100644 index 000000000000..72d83ec36d00 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Any.PowerShell.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Any object + [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); + + /// + /// 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.Compute.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.Compute.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.Compute.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Any.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..e825e4958fc9 --- /dev/null +++ b/src/Compute/Compute.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.Compute.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Any.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.cs new file mode 100644 index 000000000000..c4de8f181de6 --- /dev/null +++ b/src/Compute/Compute.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.Compute.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Any object + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Any object + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + + } + /// Any object + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Any.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..e59ca387bac9 --- /dev/null +++ b/src/Compute/Compute.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.Compute.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Any object + 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..9f928d42a268 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.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.Compute.Models.Api10 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// The Resource model definition. + [System.ComponentModel.TypeConverter(typeof(ResourceAutoGeneratedTypeConverter))] + public partial class ResourceAutoGenerated + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api10.IResourceAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceAutoGenerated(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.Compute.Models.Api10.IResourceAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceAutoGenerated(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.Compute.Models.Api10.IResourceAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourceAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + } + 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The Resource model definition. + [System.ComponentModel.TypeConverter(typeof(ResourceAutoGeneratedTypeConverter))] + public partial interface IResourceAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..f1cbc594cbad --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.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.Compute.Models.Api10 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceAutoGeneratedTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api10.IResourceAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourceAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourceAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourceAutoGenerated.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/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.cs new file mode 100644 index 000000000000..1334116e1a8b --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.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.Compute.Models.Api10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The Resource model definition. + public partial class ResourceAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal + { + + /// Backing field for property. + private string _id; + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private string _location; + + /// Resource location + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags _tag; + + /// Resource tags + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTags()); set => this._tag = value; } + + /// Backing field for property. + private string _type; + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ResourceAutoGenerated() + { + + } + } + /// The Resource model definition. + public partial interface IResourceAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource Id", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// Resource location + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource location", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource name", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Resource tags + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get; set; } + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource type", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The Resource model definition. + internal partial interface IResourceAutoGeneratedInternal + + { + /// Resource Id + string Id { get; set; } + /// Resource location + string Location { get; set; } + /// Resource name + string Name { get; set; } + /// Resource tags + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get; set; } + /// Resource type + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.json.cs new file mode 100644 index 000000000000..c63923f1c10f --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/ResourceAutoGenerated.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.Compute.Models.Api10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The Resource model definition. + public partial class ResourceAutoGenerated + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ResourceAutoGenerated(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_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;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTags.FromJson(__jsonTags) : Tag;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.PowerShell.cs similarity index 67% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.PowerShell.cs index 1a69df31f6ab..f945bbaa48ca 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.PowerShell.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; /// The system meta data relating to this resource. - [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] - public partial class SystemData + [System.ComponentModel.TypeConverter(typeof(SystemDataAutoGeneratedTypeConverter))] + public partial class SystemDataAutoGenerated { /// @@ -55,44 +55,44 @@ public partial class SystemData partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new SystemData(content); + return new SystemDataAutoGenerated(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new SystemData(content); + return new SystemDataAutoGenerated(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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.Compute.Models.Api10.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal SystemData(global::System.Collections.IDictionary content) + internal SystemDataAutoGenerated(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -103,21 +103,21 @@ internal SystemData(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)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("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)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 into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal SystemData(global::System.Management.Automation.PSObject content) + internal SystemDataAutoGenerated(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -128,11 +128,11 @@ internal SystemData(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)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("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -143,8 +143,8 @@ internal SystemData(global::System.Management.Automation.PSObject content) public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); } /// The system meta data relating to this resource. - [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] - public partial interface ISystemData + [System.ComponentModel.TypeConverter(typeof(SystemDataAutoGeneratedTypeConverter))] + public partial interface ISystemDataAutoGenerated { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..764ebb1bcb28 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.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.Compute.Models.Api10 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataAutoGeneratedTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api10.ISystemDataAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemDataAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemDataAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemDataAutoGenerated.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/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.cs similarity index 86% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.cs index 055f989f5952..9b4a591c92d7 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.cs @@ -8,9 +8,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The system meta data relating to this resource. - public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal + public partial class SystemDataAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal { /// Backing field for property. @@ -34,19 +34,19 @@ public partial class SystemData : public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for LastModifiedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataInternal.LastModifiedAt { get => this._lastModifiedAt; set { {_lastModifiedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGeneratedInternal.LastModifiedAt { get => this._lastModifiedAt; set { {_lastModifiedAt = value;} } } - /// Creates an new instance. - public SystemData() + /// Creates an new instance. + public SystemDataAutoGenerated() { } } /// The system meta data relating to this resource. - public partial interface ISystemData : + public partial interface ISystemDataAutoGenerated : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable { /// @@ -74,7 +74,7 @@ public partial interface ISystemData : } /// The system meta data relating to this resource. - internal partial interface ISystemDataInternal + internal partial interface ISystemDataAutoGeneratedInternal { /// diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.json.cs similarity index 90% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.json.cs index 4d80a123ed0e..b236c1774efd 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemDataAutoGenerated.json.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The system meta data relating to this resource. - public partial class SystemData + public partial class SystemDataAutoGenerated { /// @@ -54,22 +54,22 @@ public partial class SystemData partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemDataAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SystemData(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SystemDataAutoGenerated(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. - internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + internal SystemDataAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -83,13 +83,13 @@ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.Json } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.PowerShell.cs index 2a8f92a2e83f..0a584bbbdbaf 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.PowerShell.cs @@ -109,23 +109,23 @@ internal Gallery(global::System.Collections.IDictionary content) } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("SharingProfile")) { @@ -226,23 +226,23 @@ internal Gallery(global::System.Management.Automation.PSObject content) } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("SharingProfile")) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.cs index 4393262bf025..864f18948de9 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.cs @@ -16,9 +16,10 @@ public partial class Gallery : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(); /// Contains info about whether community gallery sharing is enabled. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -56,7 +57,7 @@ public partial class Gallery : /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; } /// /// The unique name of the Shared Image Gallery. This name is generated automatically by Azure. @@ -66,16 +67,7 @@ public partial class Gallery : /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location = value ; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location = value ; } /// Internal Acessors for CommunityGalleryInfoCommunityGalleryEnabled bool? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.CommunityGalleryInfoCommunityGalleryEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).CommunityGalleryInfoCommunityGalleryEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).CommunityGalleryInfoCommunityGalleryEnabled = value; } @@ -113,9 +105,18 @@ public partial class Gallery : /// Internal Acessors for SoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.ISoftDeletePolicy Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryInternal.SoftDeletePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryPropertiesInternal)Property).SoftDeletePolicy = value; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type = value; } + /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryProperties _property; @@ -155,11 +156,11 @@ public partial class Gallery : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; } /// Creates an new instance. public Gallery() @@ -182,7 +183,7 @@ public Gallery() /// Specifies information about the Shared Image Gallery that you want to create or update. public partial interface IGallery : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource { /// Contains info about whether community gallery sharing is enabled. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -313,7 +314,7 @@ public partial interface IGallery : } /// Specifies information about the Shared Image Gallery that you want to create or update. internal partial interface IGalleryInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal { /// Contains info about whether community gallery sharing is enabled. bool? CommunityGalleryInfoCommunityGalleryEnabled { get; set; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.json.cs index a3d39954501b..5866c7c73060 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Gallery.json.cs @@ -79,7 +79,7 @@ internal Gallery(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObj { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.PowerShell.cs index 5b29d6af9e81..1d4d358cef42 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.PowerShell.cs @@ -109,23 +109,23 @@ internal GalleryApplication(global::System.Collections.IDictionary content) } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Description")) { @@ -174,23 +174,23 @@ internal GalleryApplication(global::System.Management.Automation.PSObject conten } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Description")) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.cs index c08b7a35e521..55daa01be442 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.cs @@ -16,9 +16,10 @@ public partial class GalleryApplication : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(); /// /// The description of this gallery Application Definition resource. This property is updatable. @@ -39,27 +40,27 @@ public partial class GalleryApplication : /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; } /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location = value ; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties()); set { {_property = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties()); set { {_property = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type = value; } /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; } /// The privacy statement uri. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -85,11 +86,11 @@ public partial class GalleryApplication : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; } /// Creates an new instance. public GalleryApplication() @@ -112,7 +113,7 @@ public GalleryApplication() /// Specifies information about the gallery Application Definition that you want to create or update. public partial interface IGalleryApplication : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource { /// /// The description of this gallery Application Definition resource. This property is updatable. @@ -174,7 +175,7 @@ public partial interface IGalleryApplication : } /// Specifies information about the gallery Application Definition that you want to create or update. internal partial interface IGalleryApplicationInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal { /// /// The description of this gallery Application Definition resource. This property is updatable. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.json.cs index 8587db41a96b..f4f2a17795a6 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplication.json.cs @@ -79,7 +79,7 @@ internal GalleryApplication(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.J { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.PowerShell.cs index e18fd21413d7..aef8906ffa14 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.PowerShell.cs @@ -109,23 +109,23 @@ internal GalleryApplicationVersion(global::System.Collections.IDictionary conten } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("ReplicationStatus")) { @@ -250,23 +250,23 @@ internal GalleryApplicationVersion(global::System.Management.Automation.PSObject } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("ReplicationStatus")) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.cs index b02e97401991..2c27953ae2ff 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.cs @@ -16,9 +16,10 @@ public partial class GalleryApplicationVersion : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(); /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. @@ -28,7 +29,7 @@ public partial class GalleryApplicationVersion : /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; } /// /// Required. The path and arguments to install the gallery application. This is limited to 4096 characters. @@ -38,16 +39,7 @@ public partial class GalleryApplicationVersion : /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location = value ; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location = value ; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties()); set { {_property = value;} } } @@ -79,9 +71,18 @@ public partial class GalleryApplicationVersion : /// Internal Acessors for ReplicationStatusSummary Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IRegionalReplicationStatus[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionInternal.ReplicationStatusSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersionPropertiesInternal)Property).ReplicationStatusSummary = value; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type = value; } + /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; } /// Required. The mediaLink of the artifact, must be a readable storage page blob. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -182,7 +183,7 @@ public partial class GalleryApplicationVersion : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag = value ?? null /* model class */; } /// /// The target regions where the Image Version is going to be replicated to. This property is updatable. @@ -192,7 +193,7 @@ public partial class GalleryApplicationVersion : /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; } /// /// Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke @@ -223,7 +224,7 @@ public GalleryApplicationVersion() /// Specifies information about the gallery Application Version that you want to create or update. public partial interface IGalleryApplicationVersion : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource { /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. @@ -425,7 +426,7 @@ public partial interface IGalleryApplicationVersion : } /// Specifies information about the gallery Application Version that you want to create or update. internal partial interface IGalleryApplicationVersionInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal { /// /// Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.json.cs index 44e1348f01c4..267121779ec5 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryApplicationVersion.json.cs @@ -79,7 +79,7 @@ internal GalleryApplicationVersion(Microsoft.Azure.PowerShell.Cmdlets.Compute.Ru { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryApplicationVersionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.PowerShell.cs index aafb0bc1890e..1a31fbd63fd8 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.PowerShell.cs @@ -109,23 +109,23 @@ internal GalleryImage(global::System.Collections.IDictionary content) } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Disallowed")) { @@ -262,23 +262,23 @@ internal GalleryImage(global::System.Management.Automation.PSObject content) } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Disallowed")) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.cs index 73522fc5d5f3..3c629c982b74 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.cs @@ -16,9 +16,10 @@ public partial class GalleryImage : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(); /// The architecture of the image. Applicable to OS disks only. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -55,7 +56,7 @@ public partial class GalleryImage : /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; } /// The name of the gallery image definition offer. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -71,7 +72,7 @@ public partial class GalleryImage : /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location = value ; } /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -81,15 +82,6 @@ public partial class GalleryImage : [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).MemoryMin = value ?? default(int); } - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type = value; } - /// Internal Acessors for Disallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IDisallowed Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.Disallowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Disallowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).Disallowed = value; } @@ -114,9 +106,18 @@ public partial class GalleryImage : /// Internal Acessors for RecommendedVCpUs Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageInternal.RecommendedVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImagePropertiesInternal)Property).RecommendedVCpUs = value; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type = value; } + /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; } /// /// This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. @@ -164,11 +165,11 @@ public partial class GalleryImage : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; } /// The maximum number of the resource. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -199,7 +200,7 @@ public GalleryImage() /// Specifies information about the gallery image definition that you want to create or update. public partial interface IGalleryImage : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource { /// The architecture of the image. Applicable to OS disks only. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( @@ -391,7 +392,7 @@ public partial interface IGalleryImage : } /// Specifies information about the gallery image definition that you want to create or update. internal partial interface IGalleryImageInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal { /// The architecture of the image. Applicable to OS disks only. Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.Architecture? Architecture { get; set; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.json.cs index 4ab1d6f788ae..9ea5af265229 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImage.json.cs @@ -79,7 +79,7 @@ internal GalleryImage(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.Js { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.PowerShell.cs index be6c4300d53d..aef5f09adc7d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.PowerShell.cs @@ -109,23 +109,23 @@ internal GalleryImageVersion(global::System.Collections.IDictionary content) } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("ReplicationStatus")) { @@ -246,23 +246,23 @@ internal GalleryImageVersion(global::System.Management.Automation.PSObject conte } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("ReplicationStatus")) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.cs index 39d7f3236a52..7fcd910422c5 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.cs @@ -16,26 +16,18 @@ public partial class GalleryImageVersion : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(); /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; } /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location = value ; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Location = value ; } /// Internal Acessors for OSDiskImageSizeInGb int? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb = value; } @@ -73,9 +65,18 @@ public partial class GalleryImageVersion : /// Internal Acessors for StorageProfileSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryArtifactVersionSource Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionInternal.StorageProfileSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryImageVersionPropertiesInternal)Property).StorageProfileSource = value; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type = value; } + /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Name; } /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' @@ -180,11 +181,11 @@ public partial class GalleryImageVersion : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Tag = value ?? null /* model class */; } /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)__resource).Type; } /// /// The uri of the gallery artifact version source. Currently used to specify vhd/blob source. @@ -213,7 +214,7 @@ public GalleryImageVersion() /// Specifies information about the gallery image version that you want to create or update. public partial interface IGalleryImageVersion : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource { /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' @@ -391,7 +392,7 @@ public partial interface IGalleryImageVersion : } /// Specifies information about the gallery image version that you want to create or update. internal partial interface IGalleryImageVersionInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal { /// /// The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.json.cs index b901cae649b7..30a821cf6894 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/GalleryImageVersion.json.cs @@ -79,7 +79,7 @@ internal GalleryImageVersion(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime. { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.GalleryImageVersionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.PowerShell.cs similarity index 71% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.PowerShell.cs index 3605794a7c67..c894caba63af 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class Resource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Resource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Resource(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -103,29 +103,29 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,23 +140,23 @@ internal Resource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.TypeConverter.cs similarity index 97% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.TypeConverter.cs index 7fa1eb192d4d..c36a91756b3a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.cs similarity index 91% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.cs index e4688b9bc3b5..d660f43bce7f 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; /// The Resource model definition. public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal { /// Backing field for property. @@ -28,13 +28,13 @@ public partial class Resource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.json.cs similarity index 96% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.json.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.json.cs index 116f624465ed..73475fe19b36 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/Resource.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20220103/Resource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103 { using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new Resource(json) : null; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.PowerShell.cs index ae2d83ad224a..ab8e999c686d 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.PowerShell.cs @@ -112,23 +112,23 @@ internal VirtualMachineRunCommand(global::System.Collections.IDictionary content } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Source")) { @@ -281,23 +281,23 @@ internal VirtualMachineRunCommand(global::System.Management.Automation.PSObject } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Source")) { diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.cs index d2a60c5bb369..8ac5ad1c1622 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.cs @@ -14,9 +14,10 @@ public partial class VirtualMachineRunCommand : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceAutoGenerated(); /// /// Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. @@ -45,7 +46,7 @@ public partial class VirtualMachineRunCommand : /// Resource Id [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } /// Script end time. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -81,16 +82,16 @@ public partial class VirtualMachineRunCommand : /// Resource location [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Location = value ; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value; } /// Internal Acessors for ErrorBlobManagedIdentity Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20230701.IRunCommandManagedIdentity Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20230701.IVirtualMachineRunCommandInternal.ErrorBlobManagedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20230701.IVirtualMachineRunCommandPropertiesInternal)Property).ErrorBlobManagedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20230701.IVirtualMachineRunCommandPropertiesInternal)Property).ErrorBlobManagedIdentity = value; } @@ -115,7 +116,7 @@ public partial class VirtualMachineRunCommand : /// Resource name [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } /// /// Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. @@ -197,7 +198,7 @@ public partial class VirtualMachineRunCommand : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Tag = value ?? null /* model class */; } /// The timeout in seconds to execute the run command. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] @@ -214,7 +215,7 @@ public partial class VirtualMachineRunCommand : /// Resource type [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation @@ -224,8 +225,8 @@ public partial class VirtualMachineRunCommand : /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated), __resourceAutoGenerated); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated), __resourceAutoGenerated); } /// Creates an new instance. @@ -237,7 +238,7 @@ public VirtualMachineRunCommand() /// Describes a Virtual Machine run command. public partial interface IVirtualMachineRunCommand : Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGenerated { /// /// Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. @@ -492,7 +493,7 @@ public partial interface IVirtualMachineRunCommand : } /// Describes a Virtual Machine run command. internal partial interface IVirtualMachineRunCommandInternal : - Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceAutoGeneratedInternal { /// /// Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.json.cs index 65d97de220a6..639c468451ce 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20230701/VirtualMachineRunCommand.json.cs @@ -84,7 +84,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M { return container; } - __resource?.ToJson(container, serializationMode); + __resourceAutoGenerated?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; @@ -102,7 +102,7 @@ internal VirtualMachineRunCommand(Microsoft.Azure.PowerShell.Cmdlets.Compute.Run { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.Resource(json); + __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ResourceAutoGenerated(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20230701.VirtualMachineRunCommandProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.PowerShell.cs new file mode 100644 index 000000000000..a8f165b191d4 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Contains metadata of a diagnostic type + [System.ComponentModel.TypeConverter(typeof(ComputeDiagnosticBaseTypeConverter))] + public partial class ComputeDiagnosticBase + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ComputeDiagnosticBase(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.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SupportedResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).SupportedResourceType = (string[]) content.GetValueForProperty("SupportedResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).SupportedResourceType, __y => TypeConverterExtensions.SelectToArray(__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 ComputeDiagnosticBase(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.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SupportedResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).SupportedResourceType = (string[]) content.GetValueForProperty("SupportedResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal)this).SupportedResourceType, __y => TypeConverterExtensions.SelectToArray(__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.Compute.Models.Api20240301Preview.IComputeDiagnosticBase DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ComputeDiagnosticBase(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.Compute.Models.Api20240301Preview.IComputeDiagnosticBase DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ComputeDiagnosticBase(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.Compute.Models.Api20240301Preview.IComputeDiagnosticBase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Contains metadata of a diagnostic type + [System.ComponentModel.TypeConverter(typeof(ComputeDiagnosticBaseTypeConverter))] + public partial interface IComputeDiagnosticBase + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.TypeConverter.cs new file mode 100644 index 000000000000..2e787c2730a2 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ComputeDiagnosticBaseTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IComputeDiagnosticBase ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ComputeDiagnosticBase.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ComputeDiagnosticBase.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ComputeDiagnosticBase.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.cs new file mode 100644 index 000000000000..f5c053ede983 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.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.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Contains metadata of a diagnostic type + public partial class ComputeDiagnosticBase : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2 __resourceAutoGenerated2 = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBaseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties _property; + + /// Contains additional properties of a diagnostic + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties()); set => this._property = value; } + + /// Describes what are the supported resource types for a diagnostic. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string[] SupportedResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticPropertiesInternal)Property).SupportedResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticPropertiesInternal)Property).SupportedResourceType = value ?? null /* arrayOf */; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Type; } + + /// Creates an new instance. + public ComputeDiagnosticBase() + { + + } + + /// 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.Compute.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated2), __resourceAutoGenerated2); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated2), __resourceAutoGenerated2); + } + } + /// Contains metadata of a diagnostic type + public partial interface IComputeDiagnosticBase : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2 + { + /// Describes what are the supported resource types for a diagnostic. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes what are the supported resource types for a diagnostic.", + SerializedName = @"supportedResourceTypes", + PossibleTypes = new [] { typeof(string) })] + string[] SupportedResourceType { get; set; } + + } + /// Contains metadata of a diagnostic type + internal partial interface IComputeDiagnosticBaseInternal : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal + { + /// Contains additional properties of a diagnostic + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties Property { get; set; } + /// Describes what are the supported resource types for a diagnostic. + string[] SupportedResourceType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.json.cs new file mode 100644 index 000000000000..f194ae57d13c --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticBase.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Contains metadata of a diagnostic type + public partial class ComputeDiagnosticBase + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ComputeDiagnosticBase(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceAutoGenerated2 = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ComputeDiagnosticBase(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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceAutoGenerated2?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.PowerShell.cs new file mode 100644 index 000000000000..c8a6d6df8243 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Lists all available Compute diagnostics for a subscription in a location. + [System.ComponentModel.TypeConverter(typeof(ComputeDiagnosticsListTypeConverter))] + public partial class ComputeDiagnosticsList + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ComputeDiagnosticsList(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.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)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 ComputeDiagnosticsList(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.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal)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.Compute.Models.Api20240301Preview.IComputeDiagnosticsList DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ComputeDiagnosticsList(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.Compute.Models.Api20240301Preview.IComputeDiagnosticsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ComputeDiagnosticsList(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.Compute.Models.Api20240301Preview.IComputeDiagnosticsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Lists all available Compute diagnostics for a subscription in a location. + [System.ComponentModel.TypeConverter(typeof(ComputeDiagnosticsListTypeConverter))] + public partial interface IComputeDiagnosticsList + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.TypeConverter.cs new file mode 100644 index 000000000000..cabb688af8c6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ComputeDiagnosticsListTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IComputeDiagnosticsList ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsList).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ComputeDiagnosticsList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ComputeDiagnosticsList.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ComputeDiagnosticsList.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.cs new file mode 100644 index 000000000000..9b001a59790d --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Lists all available Compute diagnostics for a subscription in a location. + public partial class ComputeDiagnosticsList : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsList, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsListInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The continuation token. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase[] _value; + + /// + /// The collection of available Compute diagnostics returned by the listing operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ComputeDiagnosticsList() + { + + } + } + /// Lists all available Compute diagnostics for a subscription in a location. + public partial interface IComputeDiagnosticsList : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// The continuation token. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The continuation token.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// + /// The collection of available Compute diagnostics returned by the listing operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The collection of available Compute diagnostics returned by the listing operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase[] Value { get; set; } + + } + /// Lists all available Compute diagnostics for a subscription in a location. + internal partial interface IComputeDiagnosticsListInternal + + { + /// The continuation token. + string NextLink { get; set; } + /// + /// The collection of available Compute diagnostics returned by the listing operation. + /// + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.json.cs new file mode 100644 index 000000000000..af4d1ed4a982 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsList.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Lists all available Compute diagnostics for a subscription in a location. + public partial class ComputeDiagnosticsList + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ComputeDiagnosticsList(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticBase) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase.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.Compute.Models.Api20240301Preview.IComputeDiagnosticsList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ComputeDiagnosticsList(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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.PowerShell.cs new file mode 100644 index 000000000000..577e7602ba39 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Api output result when Compute Diagnostic operation is completed. + [System.ComponentModel.TypeConverter(typeof(ComputeDiagnosticsOperationResultTypeConverter))] + public partial class ComputeDiagnosticsOperationResult + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ComputeDiagnosticsOperationResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("ResponseField")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResponseField = (string) content.GetValueForProperty("ResponseField",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResponseField, global::System.Convert.ToString); + } + if (content.Contains("ResultStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResultStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus?) content.GetValueForProperty("ResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResultStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus.CreateFrom); + } + if (content.Contains("CreatedUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).CreatedUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedUtc",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).CreatedUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailTarget = (string) content.GetValueForProperty("ErrorDetailTarget",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailDetails")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailDetails = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("ErrorDetailDetails",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailDetails, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorDetailAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorDetailAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ComputeDiagnosticsOperationResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("ResponseField")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResponseField = (string) content.GetValueForProperty("ResponseField",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResponseField, global::System.Convert.ToString); + } + if (content.Contains("ResultStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResultStatus = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus?) content.GetValueForProperty("ResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ResultStatus, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus.CreateFrom); + } + if (content.Contains("CreatedUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).CreatedUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedUtc",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).CreatedUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailTarget = (string) content.GetValueForProperty("ErrorDetailTarget",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailDetails")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailDetails = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("ErrorDetailDetails",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailDetails, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorDetailAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorDetailAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal)this).ErrorDetailAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorAdditionalInfoTypeConverter.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.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ComputeDiagnosticsOperationResult(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.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ComputeDiagnosticsOperationResult(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.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Api output result when Compute Diagnostic operation is completed. + [System.ComponentModel.TypeConverter(typeof(ComputeDiagnosticsOperationResultTypeConverter))] + public partial interface IComputeDiagnosticsOperationResult + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.TypeConverter.cs new file mode 100644 index 000000000000..96424654ee85 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ComputeDiagnosticsOperationResultTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ComputeDiagnosticsOperationResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ComputeDiagnosticsOperationResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ComputeDiagnosticsOperationResult.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.cs new file mode 100644 index 000000000000..839a7ca98b02 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Api output result when Compute Diagnostic operation is completed. + public partial class ComputeDiagnosticsOperationResult : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdUtc; + + /// The time when the disk inspection was completed. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedUtc { get => this._createdUtc; set => this._createdUtc = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail _errorDetail; + + /// The API error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail()); set => this._errorDetail = value; } + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] ErrorDetailAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] ErrorDetailDetails { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Detail; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Message; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string ErrorDetailTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Target; } + + /// Backing field for property. + private string _message; + + /// The result of the disk inspection operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail()); set { {_errorDetail = value;} } } + + /// Internal Acessors for ErrorDetailAdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal.ErrorDetailAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).AdditionalInfo = value; } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Code = value; } + + /// Internal Acessors for ErrorDetailDetails + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal.ErrorDetailDetails { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Detail = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Message = value; } + + /// Internal Acessors for ErrorDetailTarget + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResultInternal.ErrorDetailTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)ErrorDetail).Target = value; } + + /// Backing field for property. + private string _responseField; + + /// The response fields of the disk inspection operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string ResponseField { get => this._responseField; set => this._responseField = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus? _resultStatus; + + /// Result status of the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus? ResultStatus { get => this._resultStatus; set => this._resultStatus = value; } + + /// Creates an new instance. + public ComputeDiagnosticsOperationResult() + { + + } + } + /// Api output result when Compute Diagnostic operation is completed. + public partial interface IComputeDiagnosticsOperationResult : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// The time when the disk inspection was completed. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time when the disk inspection was completed.", + SerializedName = @"createdUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedUtc { get; set; } + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] ErrorDetailAdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] ErrorDetailDetails { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailTarget { get; } + /// The result of the disk inspection operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The result of the disk inspection operation.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// The response fields of the disk inspection operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The response fields of the disk inspection operation.", + SerializedName = @"responseFields", + PossibleTypes = new [] { typeof(string) })] + string ResponseField { get; set; } + /// Result status of the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Result status of the async operation.", + SerializedName = @"resultStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus? ResultStatus { get; set; } + + } + /// Api output result when Compute Diagnostic operation is completed. + internal partial interface IComputeDiagnosticsOperationResultInternal + + { + /// The time when the disk inspection was completed. + global::System.DateTime? CreatedUtc { get; set; } + /// The API error details. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail ErrorDetail { get; set; } + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] ErrorDetailAdditionalInfo { get; set; } + /// The error code. + string ErrorDetailCode { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] ErrorDetailDetails { get; set; } + /// The error message. + string ErrorDetailMessage { get; set; } + /// The error target. + string ErrorDetailTarget { get; set; } + /// The result of the disk inspection operation. + string Message { get; set; } + /// The response fields of the disk inspection operation. + string ResponseField { get; set; } + /// Result status of the async operation. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus? ResultStatus { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.json.cs new file mode 100644 index 000000000000..98a9874eb819 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ComputeDiagnosticsOperationResult.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Api output result when Compute Diagnostic operation is completed. + public partial class ComputeDiagnosticsOperationResult + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ComputeDiagnosticsOperationResult(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorDetail = If( json?.PropertyT("errorDetail"), out var __jsonErrorDetail) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail.FromJson(__jsonErrorDetail) : ErrorDetail;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_responseField = If( json?.PropertyT("responseFields"), out var __jsonResponseFields) ? (string)__jsonResponseFields : (string)ResponseField;} + {_resultStatus = If( json?.PropertyT("resultStatus"), out var __jsonResultStatus) ? (string)__jsonResultStatus : (string)ResultStatus;} + {_createdUtc = If( json?.PropertyT("createdUTC"), out var __jsonCreatedUtc) ? global::System.DateTime.TryParse((string)__jsonCreatedUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedUtcValue) ? __jsonCreatedUtcValue : CreatedUtc : CreatedUtc;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IComputeDiagnosticsOperationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ComputeDiagnosticsOperationResult(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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._errorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._errorDetail.ToJson(null,serializationMode) : null, "errorDetail" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AddIf( null != (((object)this._responseField)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._responseField.ToString()) : null, "responseFields" ,container.Add ); + AddIf( null != (((object)this._resultStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._resultStatus.ToString()) : null, "resultStatus" ,container.Add ); + AddIf( null != this._createdUtc ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._createdUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdUTC" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.PowerShell.cs new file mode 100644 index 000000000000..d44ac75659b6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.PowerShell.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Contains additional properties of a diagnostic + [System.ComponentModel.TypeConverter(typeof(DiagnosticPropertiesTypeConverter))] + public partial class DiagnosticProperties + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IDiagnosticProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DiagnosticProperties(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.Compute.Models.Api20240301Preview.IDiagnosticProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DiagnosticProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DiagnosticProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SupportedResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticPropertiesInternal)this).SupportedResourceType = (string[]) content.GetValueForProperty("SupportedResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticPropertiesInternal)this).SupportedResourceType, __y => TypeConverterExtensions.SelectToArray(__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 DiagnosticProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SupportedResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticPropertiesInternal)this).SupportedResourceType = (string[]) content.GetValueForProperty("SupportedResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticPropertiesInternal)this).SupportedResourceType, __y => TypeConverterExtensions.SelectToArray(__y, 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.Compute.Models.Api20240301Preview.IDiagnosticProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Contains additional properties of a diagnostic + [System.ComponentModel.TypeConverter(typeof(DiagnosticPropertiesTypeConverter))] + public partial interface IDiagnosticProperties + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.TypeConverter.cs new file mode 100644 index 000000000000..e9cfffd78dba --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DiagnosticPropertiesTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IDiagnosticProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DiagnosticProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DiagnosticProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DiagnosticProperties.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.cs new file mode 100644 index 000000000000..ec5fa3a35aea --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Contains additional properties of a diagnostic + public partial class DiagnosticProperties : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticPropertiesInternal + { + + /// Backing field for property. + private string[] _supportedResourceType; + + /// Describes what are the supported resource types for a diagnostic. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string[] SupportedResourceType { get => this._supportedResourceType; set => this._supportedResourceType = value; } + + /// Creates an new instance. + public DiagnosticProperties() + { + + } + } + /// Contains additional properties of a diagnostic + public partial interface IDiagnosticProperties : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Describes what are the supported resource types for a diagnostic. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes what are the supported resource types for a diagnostic.", + SerializedName = @"supportedResourceTypes", + PossibleTypes = new [] { typeof(string) })] + string[] SupportedResourceType { get; set; } + + } + /// Contains additional properties of a diagnostic + internal partial interface IDiagnosticPropertiesInternal + + { + /// Describes what are the supported resource types for a diagnostic. + string[] SupportedResourceType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.json.cs new file mode 100644 index 000000000000..7dfca3e38809 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/DiagnosticProperties.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Contains additional properties of a diagnostic + public partial class DiagnosticProperties + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal DiagnosticProperties(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_supportedResourceType = If( json?.PropertyT("supportedResourceTypes"), out var __jsonSupportedResourceTypes) ? If( __jsonSupportedResourceTypes as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : SupportedResourceType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IDiagnosticProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new DiagnosticProperties(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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._supportedResourceType) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __x in this._supportedResourceType ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("supportedResourceTypes",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..0dfbe2e98a95 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.PowerShell.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Error Detail message. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailAutoGeneratedTypeConverter))] + public partial class ErrorDetailAutoGenerated + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetailAutoGenerated(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.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetailAutoGenerated(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetailAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InnerError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerError = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerError) content.GetValueForProperty("InnerError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerError, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.InnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("InnerErrorExceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorExceptiontype = (string) content.GetValueForProperty("InnerErrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorExceptiontype, global::System.Convert.ToString); + } + if (content.Contains("InnerErrorErrordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorErrordetail = (string) content.GetValueForProperty("InnerErrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorErrordetail, 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 ErrorDetailAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InnerError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerError = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerError) content.GetValueForProperty("InnerError",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerError, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.InnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("InnerErrorExceptiontype")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorExceptiontype = (string) content.GetValueForProperty("InnerErrorExceptiontype",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorExceptiontype, global::System.Convert.ToString); + } + if (content.Contains("InnerErrorErrordetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorErrordetail = (string) content.GetValueForProperty("InnerErrorErrordetail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal)this).InnerErrorErrordetail, 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.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Error Detail message. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailAutoGeneratedTypeConverter))] + public partial interface IErrorDetailAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..d62d80e1d350 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailAutoGeneratedTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetailAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetailAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetailAutoGenerated.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.cs new file mode 100644 index 000000000000..effe9ef96768 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Error Detail message. + public partial class ErrorDetailAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal + { + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] _detail; + + /// The Api error details + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get => this._detail; set => this._detail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerError _innerError; + + /// The Api inner error + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerError InnerError { get => (this._innerError = this._innerError ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.InnerError()); set => this._innerError = value; } + + /// The internal error message or exception dump. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string InnerErrorErrordetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerErrorInternal)InnerError).Errordetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerErrorInternal)InnerError).Errordetail = value ?? null; } + + /// The exception type. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string InnerErrorExceptiontype { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerErrorInternal)InnerError).Exceptiontype; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerErrorInternal)InnerError).Exceptiontype = value ?? null; } + + /// Backing field for property. + private string _message; + + /// User friendly error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Internal Acessors for InnerError + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerError Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGeneratedInternal.InnerError { get => (this._innerError = this._innerError ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.InnerError()); set { {_innerError = value;} } } + + /// Backing field for property. + private string _target; + + /// The target of the particular error. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Target { get => this._target; set => this._target = value; } + + /// Creates an new instance. + public ErrorDetailAutoGenerated() + { + + } + } + /// Error Detail message. + public partial interface IErrorDetailAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// The Api error details + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Api error details", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get; set; } + /// The internal error message or exception dump. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The internal error message or exception dump.", + SerializedName = @"errordetail", + PossibleTypes = new [] { typeof(string) })] + string InnerErrorErrordetail { get; set; } + /// The exception type. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The exception type.", + SerializedName = @"exceptiontype", + PossibleTypes = new [] { typeof(string) })] + string InnerErrorExceptiontype { get; set; } + /// User friendly error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User friendly error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// The target of the particular error. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target of the particular error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + + } + /// Error Detail message. + internal partial interface IErrorDetailAutoGeneratedInternal + + { + /// The error code. + string Code { get; set; } + /// The Api error details + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get; set; } + /// The Api inner error + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IInnerError InnerError { get; set; } + /// The internal error message or exception dump. + string InnerErrorErrordetail { get; set; } + /// The exception type. + string InnerErrorExceptiontype { get; set; } + /// User friendly error message. + string Message { get; set; } + /// The target of the particular error. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.json.cs new file mode 100644 index 000000000000..41c0630111ea --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorDetailAutoGenerated.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Error Detail message. + public partial class ErrorDetailAutoGenerated + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetailAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_innerError = If( json?.PropertyT("innerError"), out var __jsonInnerError) ? Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.InnerError.FromJson(__jsonInnerError) : InnerError;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorDetailAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ErrorDetailAutoGenerated(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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._innerError ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._innerError.ToJson(null,serializationMode) : null, "innerError" ,container.Add ); + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..e9c8b20852e6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// An error response from the Compute Diagnostic Resource Provider service. + [System.ComponentModel.TypeConverter(typeof(ErrorResponseAutoGeneratedTypeConverter))] + public partial class ErrorResponseAutoGenerated + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponseAutoGenerated(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.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponseAutoGenerated(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponseAutoGenerated(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.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponseAutoGenerated(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.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// An error response from the Compute Diagnostic Resource Provider service. + [System.ComponentModel.TypeConverter(typeof(ErrorResponseAutoGeneratedTypeConverter))] + public partial interface IErrorResponseAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..012bb1dc7516 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseAutoGeneratedTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponseAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponseAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponseAutoGenerated.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.cs new file mode 100644 index 000000000000..ebfb8c93af16 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.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. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// An error response from the Compute Diagnostic Resource Provider service. + public partial class ErrorResponseAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail _error; + + /// The error detail. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGeneratedInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponseAutoGenerated() + { + + } + } + /// An error response from the Compute Diagnostic Resource Provider service. + public partial interface IErrorResponseAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// An error response from the Compute Diagnostic Resource Provider service. + internal partial interface IErrorResponseAutoGeneratedInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get; set; } + /// The error detail. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.json.cs new file mode 100644 index 000000000000..d497bf833fb8 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ErrorResponseAutoGenerated.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// An error response from the Compute Diagnostic Resource Provider service. + public partial class ErrorResponseAutoGenerated + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponseAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.ErrorDetail.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IErrorResponseAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ErrorResponseAutoGenerated(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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.PowerShell.cs new file mode 100644 index 000000000000..a80b4afc99f3 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// The spot placement score for sku/region/zone combination. + [System.ComponentModel.TypeConverter(typeof(PlacementScoreTypeConverter))] + public partial class PlacementScore + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IPlacementScore DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PlacementScore(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.Compute.Models.Api20240301Preview.IPlacementScore DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PlacementScore(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.Compute.Models.Api20240301Preview.IPlacementScore FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PlacementScore(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Sku, global::System.Convert.ToString); + } + if (content.Contains("Region")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Region, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).AvailabilityZone = (string) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).AvailabilityZone, global::System.Convert.ToString); + } + if (content.Contains("Score")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Score = (string) content.GetValueForProperty("Score",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Score, global::System.Convert.ToString); + } + if (content.Contains("IsQuotaAvailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).IsQuotaAvailable = (bool?) content.GetValueForProperty("IsQuotaAvailable",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).IsQuotaAvailable, (__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 PlacementScore(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Sku, global::System.Convert.ToString); + } + if (content.Contains("Region")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Region = (string) content.GetValueForProperty("Region",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Region, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).AvailabilityZone = (string) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).AvailabilityZone, global::System.Convert.ToString); + } + if (content.Contains("Score")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Score = (string) content.GetValueForProperty("Score",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).Score, global::System.Convert.ToString); + } + if (content.Contains("IsQuotaAvailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).IsQuotaAvailable = (bool?) content.GetValueForProperty("IsQuotaAvailable",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal)this).IsQuotaAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The spot placement score for sku/region/zone combination. + [System.ComponentModel.TypeConverter(typeof(PlacementScoreTypeConverter))] + public partial interface IPlacementScore + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.TypeConverter.cs new file mode 100644 index 000000000000..599b9de21e89 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PlacementScoreTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IPlacementScore ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PlacementScore.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PlacementScore.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PlacementScore.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.cs new file mode 100644 index 000000000000..36bd5373b26e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.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.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The spot placement score for sku/region/zone combination. + public partial class PlacementScore : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScoreInternal + { + + /// Backing field for property. + private string _availabilityZone; + + /// The availability region. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string AvailabilityZone { get => this._availabilityZone; set => this._availabilityZone = value; } + + /// Backing field for property. + private bool? _isQuotaAvailable; + + /// Whether the desired quota is available. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public bool? IsQuotaAvailable { get => this._isQuotaAvailable; set => this._isQuotaAvailable = value; } + + /// Backing field for property. + private string _region; + + /// The region. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Region { get => this._region; set => this._region = value; } + + /// Backing field for property. + private string _score; + + /// The placement score. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Score { get => this._score; set => this._score = value; } + + /// Backing field for property. + private string _sku; + + /// The resource's CRP virtual machine SKU size. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Sku { get => this._sku; set => this._sku = value; } + + /// Creates an new instance. + public PlacementScore() + { + + } + } + /// The spot placement score for sku/region/zone combination. + public partial interface IPlacementScore : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// The availability region. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability region.", + SerializedName = @"availabilityZone", + PossibleTypes = new [] { typeof(string) })] + string AvailabilityZone { get; set; } + /// Whether the desired quota is available. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the desired quota is available.", + SerializedName = @"isQuotaAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsQuotaAvailable { get; set; } + /// The region. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The region.", + SerializedName = @"region", + PossibleTypes = new [] { typeof(string) })] + string Region { get; set; } + /// The placement score. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The placement score.", + SerializedName = @"score", + PossibleTypes = new [] { typeof(string) })] + string Score { get; set; } + /// The resource's CRP virtual machine SKU size. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource's CRP virtual machine SKU size.", + SerializedName = @"sku", + PossibleTypes = new [] { typeof(string) })] + string Sku { get; set; } + + } + /// The spot placement score for sku/region/zone combination. + internal partial interface IPlacementScoreInternal + + { + /// The availability region. + string AvailabilityZone { get; set; } + /// Whether the desired quota is available. + bool? IsQuotaAvailable { get; set; } + /// The region. + string Region { get; set; } + /// The placement score. + string Score { get; set; } + /// The resource's CRP virtual machine SKU size. + string Sku { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.json.cs new file mode 100644 index 000000000000..e1a012987951 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/PlacementScore.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The spot placement score for sku/region/zone combination. + public partial class PlacementScore + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new PlacementScore(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal PlacementScore(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku;} + {_region = If( json?.PropertyT("region"), out var __jsonRegion) ? (string)__jsonRegion : (string)Region;} + {_availabilityZone = If( json?.PropertyT("availabilityZone"), out var __jsonAvailabilityZone) ? (string)__jsonAvailabilityZone : (string)AvailabilityZone;} + {_score = If( json?.PropertyT("score"), out var __jsonScore) ? (string)__jsonScore : (string)Score;} + {_isQuotaAvailable = If( json?.PropertyT("isQuotaAvailable"), out var __jsonIsQuotaAvailable) ? (bool?)__jsonIsQuotaAvailable : IsQuotaAvailable;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._sku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._sku.ToString()) : null, "sku" ,container.Add ); + AddIf( null != (((object)this._region)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._region.ToString()) : null, "region" ,container.Add ); + AddIf( null != (((object)this._availabilityZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._availabilityZone.ToString()) : null, "availabilityZone" ,container.Add ); + AddIf( null != (((object)this._score)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._score.ToString()) : null, "score" ,container.Add ); + AddIf( null != this._isQuotaAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonBoolean((bool)this._isQuotaAvailable) : null, "isQuotaAvailable" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.PowerShell.cs new file mode 100644 index 000000000000..28648d4b2c94 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.PowerShell.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// SpotPlacementRecommender API response. + [System.ComponentModel.TypeConverter(typeof(ResourceSizeTypeConverter))] + public partial class ResourceSize + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IResourceSize DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceSize(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.Compute.Models.Api20240301Preview.IResourceSize DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceSize(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.Compute.Models.Api20240301Preview.IResourceSize FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceSize(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSizeInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSizeInternal)this).Sku, 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 ResourceSize(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSizeInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSizeInternal)this).Sku, 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// SpotPlacementRecommender API response. + [System.ComponentModel.TypeConverter(typeof(ResourceSizeTypeConverter))] + public partial interface IResourceSize + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.TypeConverter.cs new file mode 100644 index 000000000000..205dbd1e622e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceSizeTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IResourceSize ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourceSize.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourceSize.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourceSize.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.cs new file mode 100644 index 000000000000..bd72e4e77e2b --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// SpotPlacementRecommender API response. + public partial class ResourceSize : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSizeInternal + { + + /// Backing field for property. + private string _sku; + + /// The resource's CRP virtual machine SKU size. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Sku { get => this._sku; set => this._sku = value; } + + /// Creates an new instance. + public ResourceSize() + { + + } + } + /// SpotPlacementRecommender API response. + public partial interface IResourceSize : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// The resource's CRP virtual machine SKU size. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource's CRP virtual machine SKU size.", + SerializedName = @"sku", + PossibleTypes = new [] { typeof(string) })] + string Sku { get; set; } + + } + /// SpotPlacementRecommender API response. + internal partial interface IResourceSizeInternal + + { + /// The resource's CRP virtual machine SKU size. + string Sku { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.json.cs new file mode 100644 index 000000000000..baf0b5025fa2 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/ResourceSize.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// SpotPlacementRecommender API response. + public partial class ResourceSize + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ResourceSize(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceSize(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._sku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._sku.ToString()) : null, "sku" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.PowerShell.cs new file mode 100644 index 000000000000..8c51c53b0a98 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.PowerShell.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.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Data used for requesting a Disk Inspection execution. + [System.ComponentModel.TypeConverter(typeof(RunDiskInspectionInputTypeConverter))] + public partial class RunDiskInspectionInput + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IRunDiskInspectionInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RunDiskInspectionInput(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.Compute.Models.Api20240301Preview.IRunDiskInspectionInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RunDiskInspectionInput(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.Compute.Models.Api20240301Preview.IRunDiskInspectionInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RunDiskInspectionInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("Manifest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).Manifest = (string) content.GetValueForProperty("Manifest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).Manifest, global::System.Convert.ToString); + } + if (content.Contains("UploadSasUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).UploadSasUri = (string) content.GetValueForProperty("UploadSasUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).UploadSasUri, 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 RunDiskInspectionInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("Manifest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).Manifest = (string) content.GetValueForProperty("Manifest",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).Manifest, global::System.Convert.ToString); + } + if (content.Contains("UploadSasUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).UploadSasUri = (string) content.GetValueForProperty("UploadSasUri",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal)this).UploadSasUri, 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Data used for requesting a Disk Inspection execution. + [System.ComponentModel.TypeConverter(typeof(RunDiskInspectionInputTypeConverter))] + public partial interface IRunDiskInspectionInput + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.TypeConverter.cs new file mode 100644 index 000000000000..b65a8b412560 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RunDiskInspectionInputTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IRunDiskInspectionInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RunDiskInspectionInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RunDiskInspectionInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RunDiskInspectionInput.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.cs new file mode 100644 index 000000000000..733db9c98bc9 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Data used for requesting a Disk Inspection execution. + public partial class RunDiskInspectionInput : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInputInternal + { + + /// Backing field for property. + private string _manifest; + + /// Name of manifest in order to trigger Disk Inspection. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Manifest { get => this._manifest; set => this._manifest = value; } + + /// Backing field for property. + private string _resourceId; + + /// Qualified ID of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; set => this._resourceId = value; } + + /// Backing field for property. + private string _uploadSasUri; + + /// SAS uri to the blob where results will be uploaded. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string UploadSasUri { get => this._uploadSasUri; set => this._uploadSasUri = value; } + + /// Creates an new instance. + public RunDiskInspectionInput() + { + + } + } + /// Data used for requesting a Disk Inspection execution. + public partial interface IRunDiskInspectionInput : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Name of manifest in order to trigger Disk Inspection. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of manifest in order to trigger Disk Inspection.", + SerializedName = @"manifest", + PossibleTypes = new [] { typeof(string) })] + string Manifest { get; set; } + /// Qualified ID of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Qualified ID of the resource.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + /// SAS uri to the blob where results will be uploaded. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"SAS uri to the blob where results will be uploaded.", + SerializedName = @"uploadSasUri", + PossibleTypes = new [] { typeof(string) })] + string UploadSasUri { get; set; } + + } + /// Data used for requesting a Disk Inspection execution. + internal partial interface IRunDiskInspectionInputInternal + + { + /// Name of manifest in order to trigger Disk Inspection. + string Manifest { get; set; } + /// Qualified ID of the resource. + string ResourceId { get; set; } + /// SAS uri to the blob where results will be uploaded. + string UploadSasUri { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.json.cs new file mode 100644 index 000000000000..e851575069c0 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/RunDiskInspectionInput.json.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Data used for requesting a Disk Inspection execution. + public partial class RunDiskInspectionInput + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IRunDiskInspectionInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new RunDiskInspectionInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal RunDiskInspectionInput(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} + {_manifest = If( json?.PropertyT("manifest"), out var __jsonManifest) ? (string)__jsonManifest : (string)Manifest;} + {_uploadSasUri = If( json?.PropertyT("uploadSasUri"), out var __jsonUploadSasUri) ? (string)__jsonUploadSasUri : (string)UploadSasUri;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + AddIf( null != (((object)this._manifest)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._manifest.ToString()) : null, "manifest" ,container.Add ); + AddIf( null != (((object)this._uploadSasUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._uploadSasUri.ToString()) : null, "uploadSasUri" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.PowerShell.cs new file mode 100644 index 000000000000..a0798b995b0b --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// SpotPlacementRecommender API Input. + [System.ComponentModel.TypeConverter(typeof(SpotPlacementRecommenderInputTypeConverter))] + public partial class SpotPlacementRecommenderInput + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SpotPlacementRecommenderInput(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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SpotPlacementRecommenderInput(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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SpotPlacementRecommenderInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DesiredLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredLocation = (string[]) content.GetValueForProperty("DesiredLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredLocation, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DesiredSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredSize = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]) content.GetValueForProperty("DesiredSize",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredSize, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSizeTypeConverter.ConvertFrom)); + } + if (content.Contains("DesiredCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredCount = (int?) content.GetValueForProperty("DesiredCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).AvailabilityZone = (bool?) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).AvailabilityZone, (__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 SpotPlacementRecommenderInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DesiredLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredLocation = (string[]) content.GetValueForProperty("DesiredLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredLocation, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DesiredSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredSize = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]) content.GetValueForProperty("DesiredSize",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredSize, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSizeTypeConverter.ConvertFrom)); + } + if (content.Contains("DesiredCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredCount = (int?) content.GetValueForProperty("DesiredCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).DesiredCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).AvailabilityZone = (bool?) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal)this).AvailabilityZone, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// SpotPlacementRecommender API Input. + [System.ComponentModel.TypeConverter(typeof(SpotPlacementRecommenderInputTypeConverter))] + public partial interface ISpotPlacementRecommenderInput + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.TypeConverter.cs new file mode 100644 index 000000000000..f5eab1c7af60 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SpotPlacementRecommenderInputTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SpotPlacementRecommenderInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SpotPlacementRecommenderInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SpotPlacementRecommenderInput.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.cs new file mode 100644 index 000000000000..9d561466cb1c --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// SpotPlacementRecommender API Input. + public partial class SpotPlacementRecommenderInput : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInputInternal + { + + /// Backing field for property. + private bool? _availabilityZone; + + /// Defines if the scope is zonal or regional. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public bool? AvailabilityZone { get => this._availabilityZone; set => this._availabilityZone = value; } + + /// Backing field for property. + private int? _desiredCount; + + /// Desired instance count per region/zone based on the scope. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public int? DesiredCount { get => this._desiredCount; set => this._desiredCount = value; } + + /// Backing field for property. + private string[] _desiredLocation; + + /// The desired regions + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string[] DesiredLocation { get => this._desiredLocation; set => this._desiredLocation = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] _desiredSize; + + /// The desired resource SKUs. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get => this._desiredSize; set => this._desiredSize = value; } + + /// Creates an new instance. + public SpotPlacementRecommenderInput() + { + + } + } + /// SpotPlacementRecommender API Input. + public partial interface ISpotPlacementRecommenderInput : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Defines if the scope is zonal or regional. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines if the scope is zonal or regional.", + SerializedName = @"availabilityZones", + PossibleTypes = new [] { typeof(bool) })] + bool? AvailabilityZone { get; set; } + /// Desired instance count per region/zone based on the scope. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Desired instance count per region/zone based on the scope.", + SerializedName = @"desiredCount", + PossibleTypes = new [] { typeof(int) })] + int? DesiredCount { get; set; } + /// The desired regions + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired regions", + SerializedName = @"desiredLocations", + PossibleTypes = new [] { typeof(string) })] + string[] DesiredLocation { get; set; } + /// The desired resource SKUs. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired resource SKUs.", + SerializedName = @"desiredSizes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get; set; } + + } + /// SpotPlacementRecommender API Input. + internal partial interface ISpotPlacementRecommenderInputInternal + + { + /// Defines if the scope is zonal or regional. + bool? AvailabilityZone { get; set; } + /// Desired instance count per region/zone based on the scope. + int? DesiredCount { get; set; } + /// The desired regions + string[] DesiredLocation { get; set; } + /// The desired resource SKUs. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.json.cs new file mode 100644 index 000000000000..78db908442c4 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderInput.json.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. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// SpotPlacementRecommender API Input. + public partial class SpotPlacementRecommenderInput + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SpotPlacementRecommenderInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal SpotPlacementRecommenderInput(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_desiredLocation = If( json?.PropertyT("desiredLocations"), out var __jsonDesiredLocations) ? If( __jsonDesiredLocations as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DesiredLocation;} + {_desiredSize = If( json?.PropertyT("desiredSizes"), out var __jsonDesiredSizes) ? If( __jsonDesiredSizes as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize.FromJson(__p) )) ))() : null : DesiredSize;} + {_desiredCount = If( json?.PropertyT("desiredCount"), out var __jsonDesiredCount) ? (int?)__jsonDesiredCount : DesiredCount;} + {_availabilityZone = If( json?.PropertyT("availabilityZones"), out var __jsonAvailabilityZones) ? (bool?)__jsonAvailabilityZones : AvailabilityZone;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._desiredLocation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __x in this._desiredLocation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("desiredLocations",__w); + } + if (null != this._desiredSize) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __s in this._desiredSize ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("desiredSizes",__r); + } + AddIf( null != this._desiredCount ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNumber((int)this._desiredCount) : null, "desiredCount" ,container.Add ); + AddIf( null != this._availabilityZone ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonBoolean((bool)this._availabilityZone) : null, "availabilityZones" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.PowerShell.cs new file mode 100644 index 000000000000..b42eeba184f7 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// SpotPlacementRecommender API response. + [System.ComponentModel.TypeConverter(typeof(SpotPlacementRecommenderResponseTypeConverter))] + public partial class SpotPlacementRecommenderResponse + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SpotPlacementRecommenderResponse(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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SpotPlacementRecommenderResponse(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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SpotPlacementRecommenderResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DesiredLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredLocation = (string[]) content.GetValueForProperty("DesiredLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredLocation, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DesiredSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredSize = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]) content.GetValueForProperty("DesiredSize",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredSize, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSizeTypeConverter.ConvertFrom)); + } + if (content.Contains("DesiredCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredCount = (int?) content.GetValueForProperty("DesiredCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).AvailabilityZone = (bool?) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).AvailabilityZone, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PlacementScore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).PlacementScore = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore[]) content.GetValueForProperty("PlacementScore",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).PlacementScore, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScoreTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SpotPlacementRecommenderResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DesiredLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredLocation = (string[]) content.GetValueForProperty("DesiredLocation",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredLocation, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DesiredSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredSize = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[]) content.GetValueForProperty("DesiredSize",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredSize, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSizeTypeConverter.ConvertFrom)); + } + if (content.Contains("DesiredCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredCount = (int?) content.GetValueForProperty("DesiredCount",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).DesiredCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).AvailabilityZone = (bool?) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).AvailabilityZone, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PlacementScore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).PlacementScore = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore[]) content.GetValueForProperty("PlacementScore",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal)this).PlacementScore, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScoreTypeConverter.ConvertFrom)); + } + 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// SpotPlacementRecommender API response. + [System.ComponentModel.TypeConverter(typeof(SpotPlacementRecommenderResponseTypeConverter))] + public partial interface ISpotPlacementRecommenderResponse + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.TypeConverter.cs new file mode 100644 index 000000000000..41f19659cb8f --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SpotPlacementRecommenderResponseTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SpotPlacementRecommenderResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SpotPlacementRecommenderResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SpotPlacementRecommenderResponse.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.cs new file mode 100644 index 000000000000..0a8090d86155 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.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.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// SpotPlacementRecommender API response. + public partial class SpotPlacementRecommenderResponse : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponseInternal + { + + /// Backing field for property. + private bool? _availabilityZone; + + /// Defines if the scope is zonal or regional. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public bool? AvailabilityZone { get => this._availabilityZone; set => this._availabilityZone = value; } + + /// Backing field for property. + private int? _desiredCount; + + /// Desired instance count per region/zone based on the scope. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public int? DesiredCount { get => this._desiredCount; set => this._desiredCount = value; } + + /// Backing field for property. + private string[] _desiredLocation; + + /// The desired regions + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string[] DesiredLocation { get => this._desiredLocation; set => this._desiredLocation = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] _desiredSize; + + /// The desired resource SKUs. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get => this._desiredSize; set => this._desiredSize = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore[] _placementScore; + + /// The spot placement scores. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore[] PlacementScore { get => this._placementScore; set => this._placementScore = value; } + + /// Creates an new instance. + public SpotPlacementRecommenderResponse() + { + + } + } + /// SpotPlacementRecommender API response. + public partial interface ISpotPlacementRecommenderResponse : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// Defines if the scope is zonal or regional. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines if the scope is zonal or regional.", + SerializedName = @"availabilityZones", + PossibleTypes = new [] { typeof(bool) })] + bool? AvailabilityZone { get; set; } + /// Desired instance count per region/zone based on the scope. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Desired instance count per region/zone based on the scope.", + SerializedName = @"desiredCount", + PossibleTypes = new [] { typeof(int) })] + int? DesiredCount { get; set; } + /// The desired regions + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired regions", + SerializedName = @"desiredLocations", + PossibleTypes = new [] { typeof(string) })] + string[] DesiredLocation { get; set; } + /// The desired resource SKUs. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired resource SKUs.", + SerializedName = @"desiredSizes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get; set; } + /// The spot placement scores. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The spot placement scores.", + SerializedName = @"placementScores", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore[] PlacementScore { get; set; } + + } + /// SpotPlacementRecommender API response. + internal partial interface ISpotPlacementRecommenderResponseInternal + + { + /// Defines if the scope is zonal or regional. + bool? AvailabilityZone { get; set; } + /// Desired instance count per region/zone based on the scope. + int? DesiredCount { get; set; } + /// The desired regions + string[] DesiredLocation { get; set; } + /// The desired resource SKUs. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get; set; } + /// The spot placement scores. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore[] PlacementScore { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.json.cs new file mode 100644 index 000000000000..4202084c8973 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/SpotPlacementRecommenderResponse.json.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.PowerShell.Cmdlets.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// SpotPlacementRecommender API response. + public partial class SpotPlacementRecommenderResponse + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SpotPlacementRecommenderResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal SpotPlacementRecommenderResponse(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_desiredLocation = If( json?.PropertyT("desiredLocations"), out var __jsonDesiredLocations) ? If( __jsonDesiredLocations as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DesiredLocation;} + {_desiredSize = If( json?.PropertyT("desiredSizes"), out var __jsonDesiredSizes) ? If( __jsonDesiredSizes as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize.FromJson(__p) )) ))() : null : DesiredSize;} + {_desiredCount = If( json?.PropertyT("desiredCount"), out var __jsonDesiredCount) ? (int?)__jsonDesiredCount : DesiredCount;} + {_availabilityZone = If( json?.PropertyT("availabilityZones"), out var __jsonAvailabilityZones) ? (bool?)__jsonAvailabilityZones : AvailabilityZone;} + {_placementScore = If( json?.PropertyT("placementScores"), out var __jsonPlacementScores) ? If( __jsonPlacementScores as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IPlacementScore) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScore.FromJson(__k) )) ))() : null : PlacementScore;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._desiredLocation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __x in this._desiredLocation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("desiredLocations",__w); + } + if (null != this._desiredSize) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __s in this._desiredSize ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("desiredSizes",__r); + } + AddIf( null != this._desiredCount ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNumber((int)this._desiredCount) : null, "desiredCount" ,container.Add ); + AddIf( null != this._availabilityZone ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonBoolean((bool)this._availabilityZone) : null, "availabilityZones" ,container.Add ); + if (null != this._placementScore) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.XNodeArray(); + foreach( var __n in this._placementScore ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("placementScores",__m); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.PowerShell.cs new file mode 100644 index 000000000000..12b56ac752b0 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.PowerShell.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Data used for registering a Storage Account for a Subscription. + [System.ComponentModel.TypeConverter(typeof(StorageConfigurationInputTypeConverter))] + public partial class StorageConfigurationInput + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IStorageConfigurationInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageConfigurationInput(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.Compute.Models.Api20240301Preview.IStorageConfigurationInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageConfigurationInput(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.Compute.Models.Api20240301Preview.IStorageConfigurationInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageConfigurationInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInputInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInputInternal)this).StorageAccountId, 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 StorageConfigurationInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInputInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInputInternal)this).StorageAccountId, 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Data used for registering a Storage Account for a Subscription. + [System.ComponentModel.TypeConverter(typeof(StorageConfigurationInputTypeConverter))] + public partial interface IStorageConfigurationInput + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.TypeConverter.cs new file mode 100644 index 000000000000..16feef70a6c6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageConfigurationInputTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IStorageConfigurationInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageConfigurationInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageConfigurationInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageConfigurationInput.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.cs new file mode 100644 index 000000000000..db70d8050523 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Data used for registering a Storage Account for a Subscription. + public partial class StorageConfigurationInput : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInputInternal + { + + /// Backing field for property. + private string _storageAccountId; + + /// + /// Fully qualified storage account Id. Example: "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string StorageAccountId { get => this._storageAccountId; set => this._storageAccountId = value; } + + /// Creates an new instance. + public StorageConfigurationInput() + { + + } + } + /// Data used for registering a Storage Account for a Subscription. + public partial interface IStorageConfigurationInput : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// + /// Fully qualified storage account Id. Example: "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Fully qualified storage account Id. Example: ""/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}""", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountId { get; set; } + + } + /// Data used for registering a Storage Account for a Subscription. + internal partial interface IStorageConfigurationInputInternal + + { + /// + /// Fully qualified storage account Id. Example: "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}" + /// + string StorageAccountId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.json.cs new file mode 100644 index 000000000000..5477f372f3a0 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationInput.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Data used for registering a Storage Account for a Subscription. + public partial class StorageConfigurationInput + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new StorageConfigurationInput(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal StorageConfigurationInput(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_storageAccountId = If( json?.PropertyT("storageAccountId"), out var __jsonStorageAccountId) ? (string)__jsonStorageAccountId : (string)StorageAccountId;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._storageAccountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._storageAccountId.ToString()) : null, "storageAccountId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.PowerShell.cs new file mode 100644 index 000000000000..acd9cacd4ff5 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.PowerShell.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// Api output result when there is an existing storage configuration entry. + [System.ComponentModel.TypeConverter(typeof(StorageConfigurationResponseTypeConverter))] + public partial class StorageConfigurationResponse + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api20240301Preview.IStorageConfigurationResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageConfigurationResponse(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.Compute.Models.Api20240301Preview.IStorageConfigurationResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageConfigurationResponse(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.Compute.Models.Api20240301Preview.IStorageConfigurationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageConfigurationResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponseInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponseInternal)this).StorageAccountId, 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 StorageConfigurationResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponseInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponseInternal)this).StorageAccountId, 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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Api output result when there is an existing storage configuration entry. + [System.ComponentModel.TypeConverter(typeof(StorageConfigurationResponseTypeConverter))] + public partial interface IStorageConfigurationResponse + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.TypeConverter.cs new file mode 100644 index 000000000000..90ce2fb9cb44 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.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.Compute.Models.Api20240301Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageConfigurationResponseTypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api20240301Preview.IStorageConfigurationResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageConfigurationResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageConfigurationResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageConfigurationResponse.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/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.cs new file mode 100644 index 000000000000..cecbf0a0d635 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Api output result when there is an existing storage configuration entry. + public partial class StorageConfigurationResponse : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponse, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponseInternal + { + + /// Backing field for property. + private string _storageAccountId; + + /// + /// Fully qualified storage account Id. Example: "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string StorageAccountId { get => this._storageAccountId; set => this._storageAccountId = value; } + + /// Creates an new instance. + public StorageConfigurationResponse() + { + + } + } + /// Api output result when there is an existing storage configuration entry. + public partial interface IStorageConfigurationResponse : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// + /// Fully qualified storage account Id. Example: "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified storage account Id. Example: ""/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}""", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountId { get; set; } + + } + /// Api output result when there is an existing storage configuration entry. + internal partial interface IStorageConfigurationResponseInternal + + { + /// + /// Fully qualified storage account Id. Example: "/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}" + /// + string StorageAccountId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.json.cs new file mode 100644 index 000000000000..eb8c83d1efe4 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api20240301Preview/StorageConfigurationResponse.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.Compute.Models.Api20240301Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Api output result when there is an existing storage configuration entry. + public partial class StorageConfigurationResponse + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IStorageConfigurationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new StorageConfigurationResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal StorageConfigurationResponse(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_storageAccountId = If( json?.PropertyT("storageAccountId"), out var __jsonStorageAccountId) ? (string)__jsonStorageAccountId : (string)StorageAccountId;} + 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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._storageAccountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._storageAccountId.ToString()) : null, "storageAccountId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.cs new file mode 100644 index 000000000000..55d6c495c992 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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); + + /// + /// 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.Compute.Models.Api40.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.Compute.Models.Api40.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.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// 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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.TypeConverter.cs new file mode 100644 index 000000000000..bdebfd8e8843 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..07759b58f887 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + 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.Compute.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..c50d4730ac69 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Any.FromJson(__jsonInfo) : Info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..6c9b895db708 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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); + + /// + /// 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.Compute.Models.Api40.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.Compute.Models.Api40.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.Compute.Models.Api40.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api40.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api40.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..c1b157729a87 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.cs new file mode 100644 index 000000000000..02306f1bc425 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] 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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorDetail.json.cs new file mode 100644 index 000000000000..7d612ad8c72a --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..cb5f895e507f --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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); + + /// + /// 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.Compute.Models.Api40.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.Compute.Models.Api40.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.Compute.Models.Api40.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api40.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api40.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// 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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..40065d7545a6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.cs new file mode 100644 index 000000000000..93db8fc06dac --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + 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. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorDetail[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ErrorResponse.json.cs new file mode 100644 index 000000000000..58b074be29e5 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.ErrorDetail.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..4ec4f6040a34 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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); + + /// + /// 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.Compute.Models.Api40.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.Compute.Models.Api40.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.Compute.Models.Api40.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// 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/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..57ba810fa03b --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.cs new file mode 100644 index 000000000000..c4bb63b6e305 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2 __resourceAutoGenerated2 = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)__resourceAutoGenerated2).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.Compute.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated2), __resourceAutoGenerated2); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated2), __resourceAutoGenerated2); + } + } + /// 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.Compute.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2 + { + + } + /// 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.Compute.Models.Api40.IResourceAutoGenerated2Internal + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ProxyResource.json.cs new file mode 100644 index 000000000000..dfffa835228a --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceAutoGenerated2 = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2(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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceAutoGenerated2?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.PowerShell.cs new file mode 100644 index 000000000000..62a8486892f3 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceAutoGenerated2TypeConverter))] + public partial class ResourceAutoGenerated2 + { + + /// + /// 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); + + /// + /// 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.Compute.Models.Api40.IResourceAutoGenerated2 DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceAutoGenerated2(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.Compute.Models.Api40.IResourceAutoGenerated2 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceAutoGenerated2(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.Compute.Models.Api40.IResourceAutoGenerated2 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceAutoGenerated2(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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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 ResourceAutoGenerated2(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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal)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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceAutoGenerated2TypeConverter))] + public partial interface IResourceAutoGenerated2 + + { + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.TypeConverter.cs new file mode 100644 index 000000000000..7edbe6dbd5c3 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.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.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceAutoGenerated2TypeConverter : 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.Compute.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.IResourceAutoGenerated2 ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourceAutoGenerated2.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourceAutoGenerated2.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourceAutoGenerated2.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/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.cs new file mode 100644 index 000000000000..e0ef9d911dff --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class ResourceAutoGenerated2 : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal + { + + /// 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.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2Internal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType)""); } + + /// 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.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ResourceAutoGenerated2() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResourceAutoGenerated2 : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + 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.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + 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.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = true, + 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 IResourceAutoGenerated2Internal + + { + /// + /// 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.Compute.Models.Api40.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. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? 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. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? 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/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.json.cs new file mode 100644 index 000000000000..8d67c668667e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/ResourceAutoGenerated2.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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class ResourceAutoGenerated2 + { + + /// + /// 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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.IResourceAutoGenerated2 FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new ResourceAutoGenerated2(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceAutoGenerated2(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs new file mode 100644 index 000000000000..ee968555f474 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Compute.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); + + /// + /// 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.Compute.Models.Api40.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.Compute.Models.Api40.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.Compute.Models.Api40.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.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.Compute.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// 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/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.TypeConverter.cs similarity index 97% rename from src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs rename to src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.TypeConverter.cs index bc4d260284bd..1c4054ece07a 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40 { using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.ISystemData).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.cs new file mode 100644 index 000000000000..57fbcb206849 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? 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.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? 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.Compute.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + 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.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + 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.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + 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.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + 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.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? 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. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? 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. + Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType? LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.json.cs new file mode 100644 index 000000000000..4e97a5da6220 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Models/Api40/SystemData.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.Compute.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.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.Compute.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.Compute.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.Compute.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.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/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs index b05adb1403e0..7956c4ea76eb 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.PowerShell.cs @@ -119,6 +119,10 @@ internal ComputeIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId = (string) content.GetValueForProperty("InstanceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId, global::System.Convert.ToString); } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).OperationId, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id, global::System.Convert.ToString); @@ -192,6 +196,10 @@ internal ComputeIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId = (string) content.GetValueForProperty("InstanceId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).InstanceId, global::System.Convert.ToString); } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).OperationId, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentityInternal)this).Id, global::System.Convert.ToString); diff --git a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.cs b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.cs index 041378c66ab1..33a85a5e0eb1 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.cs @@ -90,6 +90,13 @@ public partial class ComputeIdentity : [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] public string Location { get => this._location; set => this._location = value; } + /// Backing field for property. + private string _operationId; + + /// The ID of an ongoing async operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Origin(Microsoft.Azure.PowerShell.Cmdlets.Compute.PropertyOrigin.Owned)] + public string OperationId { get => this._operationId; set => this._operationId = value; } + /// Backing field for property. private string _resourceGroupName; @@ -226,6 +233,14 @@ public partial interface IComputeIdentity : SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] string Location { get; set; } + /// The ID of an ongoing async operation. + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID of an ongoing async operation.", + SerializedName = @"operationId", + PossibleTypes = new [] { typeof(string) })] + string OperationId { get; set; } /// The name of the resource group. [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( Required = false, @@ -309,6 +324,8 @@ internal partial interface IComputeIdentityInternal string InstanceId { get; set; } /// The location upon which run commands is queried. string Location { get; set; } + /// The ID of an ongoing async operation. + string OperationId { get; set; } /// The name of the resource group. string ResourceGroupName { get; set; } /// The name of the virtual machine run command. diff --git a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs index 048c9e94a4a3..e3828f0af646 100644 --- a/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs +++ b/src/Compute/Compute.Autorest/generated/api/Models/ComputeIdentity.json.cs @@ -77,6 +77,7 @@ internal ComputeIdentity(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json {_runCommandName = If( json?.PropertyT("runCommandName"), out var __jsonRunCommandName) ? (string)__jsonRunCommandName : (string)RunCommandName;} {_vMScaleSetName = If( json?.PropertyT("vmScaleSetName"), out var __jsonVMScaleSetName) ? (string)__jsonVMScaleSetName : (string)VMScaleSetName;} {_instanceId = If( json?.PropertyT("instanceId"), out var __jsonInstanceId) ? (string)__jsonInstanceId : (string)InstanceId;} + {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} AfterFromJson(json); } @@ -125,6 +126,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode ToJson(M AddIf( null != (((object)this._runCommandName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._runCommandName.ToString()) : null, "runCommandName" ,container.Add ); AddIf( null != (((object)this._vMScaleSetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._vMScaleSetName.ToString()) : null, "vmScaleSetName" ,container.Add ); AddIf( null != (((object)this._instanceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._instanceId.ToString()) : null, "instanceId" ,container.Add ); + AddIf( null != (((object)this._operationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._operationId.ToString()) : null, "operationId" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); return container; diff --git a/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.Completer.cs new file mode 100644 index 000000000000..ac3b2f603eac --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The type of identity that created the resource. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByTypeTypeConverter))] + public partial struct CreatedByType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs new file mode 100644 index 000000000000..e9d4c3230f3e --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// The type of identity that created the resource. + public partial class CreatedByTypeTypeConverter : + 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) => true; + + /// + /// 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 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) => CreatedByType.CreateFrom(sourceValue); + + /// 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/Compute/Compute.Autorest/generated/api/Support/CreatedByType.cs b/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.cs new file mode 100644 index 000000000000..1372f0e0fda6 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/CreatedByType.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.Compute.Support +{ + + /// The type of identity that created the resource. + public partial struct CreatedByType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType Application = @"Application"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType Key = @"Key"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType User = @"User"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to CreatedByType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CreatedByType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CreatedByType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CreatedByType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CreatedByType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CreatedByType && Equals((CreatedByType)obj); + } + + /// Returns hashCode for enum CreatedByType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CreatedByType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CreatedByType + /// the value to convert to an instance of . + + public static implicit operator CreatedByType(string value) + { + return new CreatedByType(value); + } + + /// Implicit operator to convert CreatedByType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType e) + { + return e._value; + } + + /// Overriding != operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.CreatedByType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.Completer.cs b/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.Completer.cs new file mode 100644 index 000000000000..a504b8c19c36 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.Completer.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. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// Result status of the async operation. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatusTypeConverter))] + public partial struct ResultStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Success".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Success'", "Success", global::System.Management.Automation.CompletionResultType.ParameterValue, "Success"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.TypeConverter.cs b/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.TypeConverter.cs new file mode 100644 index 000000000000..1e7ed6dc1c87 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// Result status of the async operation. + public partial class ResultStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => ResultStatus.CreateFrom(sourceValue); + + /// 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/Compute/Compute.Autorest/generated/api/Support/ResultStatus.cs b/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.cs new file mode 100644 index 000000000000..b08ff51d49d4 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/api/Support/ResultStatus.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Support +{ + + /// Result status of the async operation. + public partial struct ResultStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus Success = @"Success"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ResultStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ResultStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ResultStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ResultStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ResultStatus && Equals((ResultStatus)obj); + } + + /// Returns hashCode for enum ResultStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ResultStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ResultStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ResultStatus + /// the value to convert to an instance of . + + public static implicit operator ResultStatus(string value) + { + return new ResultStatus(value); + } + + /// Implicit operator to convert ResultStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus e) + { + return e._value; + } + + /// Overriding != operator for enum ResultStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ResultStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ResultStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs index 5c73074531f8..cc7e81616033 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_Get.cs @@ -238,7 +238,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -387,6 +404,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs index 98a76116b7e4..6ace79e91acc 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_GetViaIdentity.cs @@ -164,7 +164,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -338,6 +355,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs index 1552ec3f8745..46d47f33619d 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplicationVersion_List.cs @@ -214,7 +214,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -363,6 +380,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs index 923e93e7df67..04fa247885ff 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_Get.cs @@ -207,7 +207,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -356,6 +373,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs index 1a26909c886d..e9cf28e84156 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_GetViaIdentity.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs index c0ddf2893c83..b2fec7afb0eb 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/GetAzGalleryApplication_List.cs @@ -198,7 +198,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -347,6 +364,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_Post.cs b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_Post.cs new file mode 100644 index 000000000000..9bb8769f14c5 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_Post.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + using System; + + /// Generates placement scores for Spot VM skus. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSpotPlacementRecommender_Post", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Generates placement scores for Spot VM skus.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSpotPlacementRecommender_Post : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener + { + /// 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(); + + /// 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute Client => Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.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 _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput _spotPlacementRecommenderInput; + + /// SpotPlacementRecommender API Input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "SpotPlacementRecommender API Input.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"SpotPlacementRecommender API Input.", + SerializedName = @"spotPlacementRecommenderInput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput SpotPlacementRecommenderInput { get => this._spotPlacementRecommenderInput; set => this._spotPlacementRecommenderInput = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI + /// for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSpotPlacementRecommender_Post() + { + + } + + /// 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.Compute.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.Compute.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SpotPlacementRecommenderPost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SpotPlacementRecommenderPost(SubscriptionId, Location, SpotPlacementRecommenderInput, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,body=SpotPlacementRecommenderInput}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, body=SpotPlacementRecommenderInput }) + { + 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 { SubscriptionId=SubscriptionId, Location=Location, body=SpotPlacementRecommenderInput }) + { + 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostExpanded.cs new file mode 100644 index 000000000000..d052b4bfe01f --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostExpanded.cs @@ -0,0 +1,475 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + using System; + + /// Generates placement scores for Spot VM skus. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSpotPlacementRecommender_PostExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Generates placement scores for Spot VM skus.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSpotPlacementRecommender_PostExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener + { + /// 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(); + + /// SpotPlacementRecommender API Input. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput _spotPlacementRecommenderInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput(); + + /// Defines if the scope is zonal or regional. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines if the scope is zonal or regional.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines if the scope is zonal or regional.", + SerializedName = @"availabilityZones", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter AvailabilityZone { get => _spotPlacementRecommenderInputBody.AvailabilityZone ?? default(global::System.Management.Automation.SwitchParameter); set => _spotPlacementRecommenderInputBody.AvailabilityZone = value; } + + /// 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute Client => Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Desired instance count per region/zone based on the scope. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Desired instance count per region/zone based on the scope.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Desired instance count per region/zone based on the scope.", + SerializedName = @"desiredCount", + PossibleTypes = new [] { typeof(int) })] + public int DesiredCount { get => _spotPlacementRecommenderInputBody.DesiredCount ?? default(int); set => _spotPlacementRecommenderInputBody.DesiredCount = value; } + + /// The desired regions + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The desired regions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired regions", + SerializedName = @"desiredLocations", + PossibleTypes = new [] { typeof(string) })] + public string[] DesiredLocation { get => _spotPlacementRecommenderInputBody.DesiredLocation ?? null /* arrayOf */; set => _spotPlacementRecommenderInputBody.DesiredLocation = value; } + + /// The desired resource SKUs. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The desired resource SKUs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired resource SKUs.", + SerializedName = @"desiredSizes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get => _spotPlacementRecommenderInputBody.DesiredSize ?? null /* arrayOf */; set => _spotPlacementRecommenderInputBody.DesiredSize = 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.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 _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI + /// for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSpotPlacementRecommender_PostExpanded() + { + + } + + /// 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.Compute.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.Compute.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SpotPlacementRecommenderPost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SpotPlacementRecommenderPost(SubscriptionId, Location, _spotPlacementRecommenderInputBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,body=_spotPlacementRecommenderInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, body=_spotPlacementRecommenderInputBody }) + { + 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 { SubscriptionId=SubscriptionId, Location=Location, body=_spotPlacementRecommenderInputBody }) + { + 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentity.cs new file mode 100644 index 000000000000..6335786edddf --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentity.cs @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + using System; + + /// Generates placement scores for Spot VM skus. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSpotPlacementRecommender_PostViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Generates placement scores for Spot VM skus.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSpotPlacementRecommender_PostViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener + { + /// 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(); + + /// 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute Client => Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity 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.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput _spotPlacementRecommenderInput; + + /// SpotPlacementRecommender API Input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "SpotPlacementRecommender API Input.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"SpotPlacementRecommender API Input.", + SerializedName = @"spotPlacementRecommenderInput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput SpotPlacementRecommenderInput { get => this._spotPlacementRecommenderInput; set => this._spotPlacementRecommenderInput = 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.Compute.Models.Api40.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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSpotPlacementRecommender_PostViaIdentity() + { + + } + + /// 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.Compute.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.Compute.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SpotPlacementRecommenderPost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SpotPlacementRecommenderPostViaIdentity(InputObject.Id, SpotPlacementRecommenderInput, 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.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SpotPlacementRecommenderPost(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, SpotPlacementRecommenderInput, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SpotPlacementRecommenderInput}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SpotPlacementRecommenderInput }) + { + 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 { body=SpotPlacementRecommenderInput }) + { + 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentityExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentityExpanded.cs new file mode 100644 index 000000000000..223cf3b25526 --- /dev/null +++ b/src/Compute/Compute.Autorest/generated/cmdlets/InvokeAzSpotPlacementRecommender_PostViaIdentityExpanded.cs @@ -0,0 +1,464 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Extensions; + using System; + + /// Generates placement scores for Spot VM skus. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSpotPlacementRecommender_PostViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Description(@"Generates placement scores for Spot VM skus.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate", ApiVersion = "2024-03-01-preview")] + public partial class InvokeAzSpotPlacementRecommender_PostViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener + { + /// 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(); + + /// SpotPlacementRecommender API Input. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput _spotPlacementRecommenderInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput(); + + /// Defines if the scope is zonal or regional. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines if the scope is zonal or regional.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines if the scope is zonal or regional.", + SerializedName = @"availabilityZones", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter AvailabilityZone { get => _spotPlacementRecommenderInputBody.AvailabilityZone ?? default(global::System.Management.Automation.SwitchParameter); set => _spotPlacementRecommenderInputBody.AvailabilityZone = value; } + + /// 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Compute Client => Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Desired instance count per region/zone based on the scope. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Desired instance count per region/zone based on the scope.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Desired instance count per region/zone based on the scope.", + SerializedName = @"desiredCount", + PossibleTypes = new [] { typeof(int) })] + public int DesiredCount { get => _spotPlacementRecommenderInputBody.DesiredCount ?? default(int); set => _spotPlacementRecommenderInputBody.DesiredCount = value; } + + /// The desired regions + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The desired regions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired regions", + SerializedName = @"desiredLocations", + PossibleTypes = new [] { typeof(string) })] + public string[] DesiredLocation { get => _spotPlacementRecommenderInputBody.DesiredLocation ?? null /* arrayOf */; set => _spotPlacementRecommenderInputBody.DesiredLocation = value; } + + /// The desired resource SKUs. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The desired resource SKUs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired resource SKUs.", + SerializedName = @"desiredSizes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize) })] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] DesiredSize { get => _spotPlacementRecommenderInputBody.DesiredSize ?? null /* arrayOf */; set => _spotPlacementRecommenderInputBody.DesiredSize = 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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity 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.Compute.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzSpotPlacementRecommender_PostViaIdentityExpanded() + { + + } + + /// 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.Compute.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.Compute.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Compute.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SpotPlacementRecommenderPost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SpotPlacementRecommenderPostViaIdentity(InputObject.Id, _spotPlacementRecommenderInputBody, 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.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SpotPlacementRecommenderPost(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, _spotPlacementRecommenderInputBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_spotPlacementRecommenderInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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.Compute.Models.Api40.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.Compute.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_spotPlacementRecommenderInputBody }) + { + 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 { body=_spotPlacementRecommenderInputBody }) + { + 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + /// 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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs index 85a72e098327..9da60dc0bb4b 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplicationVersion_CreateExpanded.cs @@ -514,7 +514,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.NewAzGalleryApplicatio /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -693,6 +710,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs index 70ce06e118c7..0cf434d0d76b 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/NewAzGalleryApplication_CreateExpanded.cs @@ -356,7 +356,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.NewAzGalleryApplicatio /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -535,6 +552,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs index 29d2fcc4c5e5..63c643155ff4 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_Delete.cs @@ -276,7 +276,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -455,6 +472,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs index 53806b7125e5..09ecb3529f4d 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplicationVersion_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs index 7a5b1d6f88b4..ad575d85cb1f 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_Delete.cs @@ -259,7 +259,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -438,6 +455,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs index 87ccd84f89b9..30edd1730d03 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzGalleryApplication_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -400,6 +417,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs index 2664bcb5c0de..5a70ad422c99 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_Delete.cs @@ -256,7 +256,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVMRunCommand_D /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -435,6 +452,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs index 256cbe9f6a35..d74c7764b960 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVMRunCommand_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVMRunCommand_D /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -400,6 +417,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs index c13c0ba53f20..f5cd12b77e76 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_Delete.cs @@ -271,7 +271,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVmssVMRunComma /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -450,6 +467,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs index 5fd8153816fd..02faa18a47fa 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/RemoveAzVmssVMRunCommand_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.RemoveAzVmssVMRunComma /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs index 0fda5e019b7d..f3d32cb75806 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVMRunCommand_UpdateExpanded.cs @@ -497,7 +497,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.SetAzVMRunCommand_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -676,6 +693,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs index 95e7dd314baa..0ee8ac065306 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/SetAzVmssVMRunCommand_UpdateExpanded.cs @@ -510,7 +510,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.SetAzVmssVMRunCommand_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -689,6 +706,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs index a22964d8803b..cc5c51a967c2 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateExpanded.cs @@ -506,7 +506,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -685,6 +702,21 @@ public UpdateAzGalleryApplicationVersion_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs index 15c1b17bff4b..db0440e732e6 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded.cs @@ -426,7 +426,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -633,6 +650,21 @@ public UpdateAzGalleryApplicationVersion_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs index de725c7b48cb..10cc277a5fc4 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateExpanded.cs @@ -345,7 +345,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -524,6 +541,21 @@ public UpdateAzGalleryApplication_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs index a015907dd6db..f073792f049a 100644 --- a/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs +++ b/src/Compute/Compute.Autorest/generated/cmdlets/UpdateAzGalleryApplication_UpdateViaIdentityExpanded.cs @@ -280,7 +280,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Compute.Cmdlets.UpdateAzGalleryApplica /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -483,6 +500,21 @@ public UpdateAzGalleryApplication_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Compute.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). /// diff --git a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 605a14afff57..ec520a971f2e 100644 --- a/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/Compute/Compute.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -269,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.Compute.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/Compute/Compute.Autorest/help/Az.Compute.md b/src/Compute/Compute.Autorest/help/Az.Compute.md index 123fbb5af406..26e50248760a 100644 --- a/src/Compute/Compute.Autorest/help/Az.Compute.md +++ b/src/Compute/Compute.Autorest/help/Az.Compute.md @@ -17,6 +17,9 @@ Retrieves information about a gallery Application Definition. ### [Get-AzGalleryApplicationVersion](Get-AzGalleryApplicationVersion.md) Retrieves information about a gallery Application Version. +### [Invoke-AzSpotPlacementRecommender](Invoke-AzSpotPlacementRecommender.md) +Generates placement scores for Spot VM skus. + ### [New-AzGalleryApplication](New-AzGalleryApplication.md) Create or update a gallery Application Definition. diff --git a/src/Compute/Compute.Autorest/help/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/help/Invoke-AzSpotPlacementRecommender.md new file mode 100644 index 000000000000..0544b2a25e86 --- /dev/null +++ b/src/Compute/Compute.Autorest/help/Invoke-AzSpotPlacementRecommender.md @@ -0,0 +1,391 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender +schema: 2.0.0 +--- + +# Invoke-AzSpotPlacementRecommender + +## SYNOPSIS +Generates placement scores for Spot VM skus. + +## SYNTAX + +### PostExpanded (Default) +``` +Invoke-AzSpotPlacementRecommender -Location [-SubscriptionId ] [-AvailabilityZone] + [-DesiredCount ] [-DesiredLocation ] [-DesiredSize ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### Post +``` +Invoke-AzSpotPlacementRecommender -Location + -SpotPlacementRecommenderInput [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### PostViaIdentity +``` +Invoke-AzSpotPlacementRecommender -InputObject + -SpotPlacementRecommenderInput [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### PostViaIdentityExpanded +``` +Invoke-AzSpotPlacementRecommender -InputObject [-AvailabilityZone] [-DesiredCount ] + [-DesiredLocation ] [-DesiredSize ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Generates placement scores for Spot VM skus. + +## EXAMPLES + +### Example 1: Regionally scoped Spot Placement Recommender scores +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus DataNotFoundOrStale Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` + +Returns zonally scoped spot placement recommender scores for the input. + +### Example 3: Regionally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus High Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus High Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus High Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` + +Returns zonally scoped spot placement recommender scores for the input. + +## PARAMETERS + +### -AvailabilityZone +Defines if the scope is zonal or regional. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: PostExpanded, PostViaIdentityExpanded +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 +``` + +### -DesiredCount +Desired instance count per region/zone based on the scope. + +```yaml +Type: System.Int32 +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DesiredLocation +The desired regions + +```yaml +Type: System.String[] +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DesiredSize +The desired resource SKUs. +To construct, see NOTES section for DESIREDSIZE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +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.Compute.Models.IComputeIdentity +Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Post, PostExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SpotPlacementRecommenderInput +SpotPlacementRecommender API Input. +To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput +Parameter Sets: Post, PostViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: Post, PostExpanded +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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/Compute/Compute.Autorest/internal/Az.Compute.internal.psm1 b/src/Compute/Compute.Autorest/internal/Az.Compute.internal.psm1 index f63fed47d564..702b2ebc639b 100644 --- a/src/Compute/Compute.Autorest/internal/Az.Compute.internal.psm1 +++ b/src/Compute/Compute.Autorest/internal/Az.Compute.internal.psm1 @@ -24,12 +24,12 @@ # 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 diff --git a/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 index 09965bac4538..9aa158ee24c8 100644 --- a/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 +++ b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplication.ps1 @@ -167,7 +167,13 @@ begin { CreateExpanded = 'Az.Compute.private\New-AzGalleryApplication_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.Compute.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/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 index 071981a329cf..0d8c5a5c1746 100644 --- a/src/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/internal/New-AzGalleryApplicationVersion.ps1 @@ -275,7 +275,13 @@ begin { CreateExpanded = 'Az.Compute.private\New-AzGalleryApplicationVersion_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.Compute.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/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 index 8de78098c59a..9214cf400af9 100644 --- a/src/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/Compute/Compute.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -275,7 +275,13 @@ begin { CreateExpanded = 'Az.Compute.private\New-AzGalleryApplicationVersion_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.Compute.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) @@ -461,7 +467,13 @@ begin { CreateExpanded = 'Az.Compute.private\New-AzGalleryApplication_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.Compute.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) @@ -527,6 +539,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -750,7 +763,13 @@ begin { UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplicationVersion_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.Compute.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/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 b/src/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 index 57e933fc7c4c..de820b663b87 100644 --- a/src/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 +++ b/src/Compute/Compute.Autorest/internal/Update-AzGalleryApplicationVersion.ps1 @@ -47,6 +47,7 @@ INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [InstanceId ]: The instance ID of the virtual machine. [Location ]: The location upon which run commands is queried. + [OperationId ]: The ID of an ongoing async operation. [ResourceGroupName ]: The name of the resource group. [RunCommandName ]: The name of the virtual machine run command. [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -270,7 +271,13 @@ begin { UpdateViaIdentityExpanded = 'Az.Compute.private\Update-AzGalleryApplicationVersion_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.Compute.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/Compute/Compute.Autorest/test-module.ps1 b/src/Compute/Compute.Autorest/test-module.ps1 index 5149d955e0e1..860a97e406ad 100644 --- a/src/Compute/Compute.Autorest/test-module.ps1 +++ b/src/Compute/Compute.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/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json new file mode 100644 index 000000000000..03b000352107 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json @@ -0,0 +1,154 @@ +{ + "Invoke-AzSpotPlacementRecommender+[NoContext]+PostExpanded+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "247" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "41003dd1-f92c-4b08-8c67-e931889d08f9" ], + "x-ms-correlation-request-id": [ "067ea019-22cd-450b-82ae-d2d3f23ee68e" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071740Z:067ea019-22cd-450b-82ae-d2d3f23ee68e" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 500E284CC1CA4188A51B4AE19D59FCDE Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:38Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1099" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":false,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + }, + "Invoke-AzSpotPlacementRecommender+[NoContext]+PostExpanded+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1,\r\n \"availabilityZones\": true\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "3751f746-58fd-4d9d-8ce6-0cc8272b5c7b" ], + "x-ms-correlation-request-id": [ "11fadfa4-feef-4ea0-91b1-f4f8b711e434" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071742Z:11fadfa4-feef-4ea0-91b1-f4f8b711e434" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 210A529DE53043BEABDE637371BFBF76 Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:40Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3372" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":true,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + }, + "Invoke-AzSpotPlacementRecommender+[NoContext]+Post+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1,\r\n \"availabilityZones\": true\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "dd4f76a8-4f49-4e26-8373-282d2cfd3043" ], + "x-ms-correlation-request-id": [ "57f95cfa-19b8-4e80-814a-1df89a09cadc" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071744Z:57f95cfa-19b8-4e80-814a-1df89a09cadc" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 60932BA3B6D64E76942B58D9591C3AEA Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:42Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3372" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":true,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + }, + "Invoke-AzSpotPlacementRecommender+[NoContext]+Post+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1,\r\n \"availabilityZones\": false\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "278" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "c5fb1d5b-588a-4716-8b29-58adc34b7c30" ], + "x-ms-correlation-request-id": [ "bf1e6828-aa8e-4eaf-a317-0371f5df06f3" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071747Z:bf1e6828-aa8e-4eaf-a317-0371f5df06f3" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9D5E3AE06E4F4B00AC32B612D8A44022 Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:45Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1099" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":false,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 new file mode 100644 index 000000000000..2806920b6483 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -0,0 +1,64 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSpotPlacementRecommender')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSpotPlacementRecommender.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-AzSpotPlacementRecommender' { + BeforeAll { + $resourceSku1 = @{sku = "Standard_D2_v3"} + $resourceSku2 = @{sku = "Standard_D2_v2"} + $resourceSku3 = @{sku = "Standard_D4_v3"} + $desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 + $desiredLocations = 'eastus','eastus2','westus' + $desiredCount = 1 + } + + It 'PostExpanded' { + { + # Zonal + $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount $desiredCount -DesiredLocation $desiredLocations -DesiredSize $desiredSizes + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop + + # Regional + $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount $desiredCount -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop + } | Should -Not -Throw + } + + It 'Post' { + { + # Zonal + $spotPlacementRecommenderInput = + @{ + desiredSize = $desiredSizes; + desiredCount = $desiredCount; + desiredLocation = $desiredLocations; + availabilityZone = $true + } + $response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop + + # Regional + $spotPlacementRecommenderInput = + @{ + desiredSize = $desiredSizes; + desiredCount = $desiredCount; + desiredLocation = $desiredLocations; + availabilityZone = $false + } + $response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop + } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/env.json b/src/Compute/Compute.Autorest/test/env.json index ac0b8ef8128e..ffa91c03c3fb 100644 --- a/src/Compute/Compute.Autorest/test/env.json +++ b/src/Compute/Compute.Autorest/test/env.json @@ -1,8 +1,8 @@ { - "SubscriptionId": "e37510d7-33b6-4676-886f-ee75bcc01871", - "Location": "EastUS", - "rgname": "testpwshellcompute", - "ResourceGroupName": "RGComputeTestnfr5c0pt", + "ResourceGroupName": "RGComputeTest5u7v6raj", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "RandomString": "nfr5c0pt" + "RandomString": "5u7v6raj", + "rgname": "testpwshellcompute", + "SubscriptionId": "be23ca13-8eb4-4d0e-be10-b00451817956", + "Location": "EastUS" } diff --git a/src/Compute/Compute.Autorest/test/loadEnv.ps1 b/src/Compute/Compute.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/Compute/Compute.Autorest/test/loadEnv.ps1 +++ b/src/Compute/Compute.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/Compute/Compute.Autorest/test/localEnv.json b/src/Compute/Compute.Autorest/test/localEnv.json index 7af6cca258cc..19be331097a9 100644 --- a/src/Compute/Compute.Autorest/test/localEnv.json +++ b/src/Compute/Compute.Autorest/test/localEnv.json @@ -1,4 +1,8 @@ { - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "SubscriptionId": "e37510d7-33b6-4676-886f-ee75bcc01871" - } \ No newline at end of file + "SubscriptionId": "be23ca13-8eb4-4d0e-be10-b00451817956", + "Location": "EastUS", + "rgname": "testpwshellcompute", + "ResourceGroupName": "RGComputeTestbztprklq", + "RandomString": "bztprklq", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" +} diff --git a/src/Compute/Compute.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/Compute/Compute.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/Compute/Compute.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/Compute/Compute/Az.Compute.psd1 b/src/Compute/Compute/Az.Compute.psd1 index ea0d733a95a8..1889db6542ff 100644 --- a/src/Compute/Compute/Az.Compute.psd1 +++ b/src/Compute/Compute/Az.Compute.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 03/27/2024 +# Generated on: 4/16/2024 # @{ @@ -65,10 +65,10 @@ RequiredAssemblies = 'Compute.Autorest/bin/Az.Compute.private.dll', 'Microsoft.WindowsAzure.Storage.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'Compute.Automation.generated.format.ps1xml', @@ -81,11 +81,12 @@ NestedModules = @('Compute.Autorest/Az.Compute.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-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', - 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', - 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', - 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', - 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', - 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion' + 'Invoke-AzSpotPlacementRecommender', 'New-AzGalleryApplication', + 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', + 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', + 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', + 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', + 'Update-AzGalleryApplicationVersion' # 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 = 'Add-AzImageDataDisk', 'Add-AzVhd', @@ -222,7 +223,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','Compute','IAAS','VM','VirtualMachine' + Tags = 'Azure', 'ResourceManager', 'ARM', 'Compute', 'IAAS', 'VM', 'VirtualMachine' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -258,7 +259,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/Compute/Compute/help/Add-AzImageDataDisk.md b/src/Compute/Compute/help/Add-AzImageDataDisk.md index 620da8922833..e770bfd5578f 100644 --- a/src/Compute/Compute/help/Add-AzImageDataDisk.md +++ b/src/Compute/Compute/help/Add-AzImageDataDisk.md @@ -16,7 +16,7 @@ Adds a data disk to an image object. Add-AzImageDataDisk [-Image] [[-Lun] ] [[-BlobUri] ] [[-Caching] ] [-DiskSizeGB ] [-StorageAccountType ] [-SnapshotId ] [-ManagedDiskId ] [-DiskEncryptionSetId ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -166,6 +166,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SnapshotId Specifies the ID of a snapshot. diff --git a/src/Compute/Compute/help/Add-AzVMAdditionalUnattendContent.md b/src/Compute/Compute/help/Add-AzVMAdditionalUnattendContent.md index 92b3be9fd61d..68549097ea06 100644 --- a/src/Compute/Compute/help/Add-AzVMAdditionalUnattendContent.md +++ b/src/Compute/Compute/help/Add-AzVMAdditionalUnattendContent.md @@ -16,7 +16,7 @@ Adds information to the unattended Windows Setup answer file. ``` Add-AzVMAdditionalUnattendContent [-VM] [[-Content] ] [[-SettingName] ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -81,6 +81,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 +``` + ### -SettingName Specifies the name of the setting to which the content applies. The acceptable values for this parameter are: diff --git a/src/Compute/Compute/help/Add-AzVMDataDisk.md b/src/Compute/Compute/help/Add-AzVMDataDisk.md index 63e4fb87ecd2..a0eb2f79e0b4 100644 --- a/src/Compute/Compute/help/Add-AzVMDataDisk.md +++ b/src/Compute/Compute/help/Add-AzVMDataDisk.md @@ -18,7 +18,7 @@ Adds a data disk to a virtual machine. Add-AzVMDataDisk [-VM] [[-Name] ] [[-VhdUri] ] [[-Caching] ] [[-DiskSizeInGB] ] [-Lun] [-CreateOption] [[-SourceImageUri] ] [-DiskEncryptionSetId ] [-DeleteOption ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### VmManagedDiskParameterSetName @@ -26,7 +26,7 @@ Add-AzVMDataDisk [-VM] [[-Name] ] [[-VhdUri] Add-AzVMDataDisk [-VM] [[-Name] ] [[-Caching] ] [[-DiskSizeInGB] ] [-Lun] [-CreateOption] [[-ManagedDiskId] ] [[-StorageAccountType] ] [-DiskEncryptionSetId ] [-WriteAccelerator] [-DeleteOption ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -251,6 +251,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SourceImageUri Specifies the source URI of the disk that this cmdlet attaches. diff --git a/src/Compute/Compute/help/Add-AzVMNetworkInterface.md b/src/Compute/Compute/help/Add-AzVMNetworkInterface.md index 08468a23777c..945f11fa3054 100644 --- a/src/Compute/Compute/help/Add-AzVMNetworkInterface.md +++ b/src/Compute/Compute/help/Add-AzVMNetworkInterface.md @@ -16,14 +16,14 @@ Adds a network interface to a virtual machine. ### GetNicFromNicId (Default) ``` Add-AzVMNetworkInterface [-VM] [-Id] [-Primary] [-DeleteOption ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetNicFromNicObject ``` Add-AzVMNetworkInterface [-VM] [-NetworkInterface] - [-DeleteOption ] [-DefaultProfile ] + [-DeleteOption ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -133,6 +133,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VM Specifies a local virtual machine object to which to add a network interface. To create a virtual machine, use the **New-AzVMConfig** cmdlet. diff --git a/src/Compute/Compute/help/Add-AzVMSecret.md b/src/Compute/Compute/help/Add-AzVMSecret.md index 42fd946d4971..617c05812f3b 100644 --- a/src/Compute/Compute/help/Add-AzVMSecret.md +++ b/src/Compute/Compute/help/Add-AzVMSecret.md @@ -15,7 +15,7 @@ Adds a secret to a virtual machine. ``` Add-AzVMSecret [-VM] [[-SourceVaultId] ] [[-CertificateStore] ] - [[-CertificateUrl] ] [-DefaultProfile ] + [[-CertificateUrl] ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -114,6 +114,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 +``` + ### -SourceVaultId Specifies the resource ID of the Key Vault that contains the certificates that you can add to the virtual machine. This value also acts as the key for adding multiple certificates. diff --git a/src/Compute/Compute/help/Add-AzVMSshPublicKey.md b/src/Compute/Compute/help/Add-AzVMSshPublicKey.md index 80921dde811d..6933a783d01f 100644 --- a/src/Compute/Compute/help/Add-AzVMSshPublicKey.md +++ b/src/Compute/Compute/help/Add-AzVMSshPublicKey.md @@ -15,7 +15,7 @@ Adds the public keys for SSH for a virtual machine, when only creating the VM. ``` Add-AzVMSshPublicKey [-VM] [[-KeyData] ] [[-Path] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -82,6 +82,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VM Specifies the virtual machine object that this cmdlet modifies. To obtain a virtual machine object, use the [Get-AzVM](./Get-AzVM.md) cmdlet. diff --git a/src/Compute/Compute/help/Add-AzVhd.md b/src/Compute/Compute/help/Add-AzVhd.md index 10bfddac72aa..e6570689cd72 100644 --- a/src/Compute/Compute/help/Add-AzVhd.md +++ b/src/Compute/Compute/help/Add-AzVhd.md @@ -17,7 +17,7 @@ Uploads a virtual hard disk from an on-premises machine to Azure (managed disk o ``` Add-AzVhd [-ResourceGroupName] [-Destination] [-LocalFilePath] [[-NumberOfUploaderThreads] ] [[-BaseImageUriToPatch] ] [-OverWrite] [-SkipResizing] [-AsJob] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### DirectUploadToManagedDiskSet @@ -25,7 +25,7 @@ Add-AzVhd [-ResourceGroupName] [-Destination] [-LocalFilePath] [-LocalFilePath] -DiskName [-Location] [-DiskSku ] [-DiskZone ] [-DiskHyperVGeneration ] [-DiskOsType ] [[-NumberOfUploaderThreads] ] [-DataAccessAuthMode ] - [-AsJob] [-DefaultProfile ] [] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -309,6 +309,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Add-AzVmGalleryApplication.md b/src/Compute/Compute/help/Add-AzVmGalleryApplication.md index 67f7a1cf1e18..c2d4d13a252a 100644 --- a/src/Compute/Compute/help/Add-AzVmGalleryApplication.md +++ b/src/Compute/Compute/help/Add-AzVmGalleryApplication.md @@ -15,7 +15,7 @@ Add a GalleryApplication object to the PSVirtualMachine object. ``` Add-AzVmGalleryApplication -VM -GalleryApplication [-Order ] [-TreatFailureAsDeploymentFailure] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -79,6 +79,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 +``` + ### -TreatFailureAsDeploymentFailure If true, any failure for any operation in the VmApplication will fail the deployment. Defaults to false if not specified. diff --git a/src/Compute/Compute/help/Add-AzVmssAdditionalUnattendContent.md b/src/Compute/Compute/help/Add-AzVmssAdditionalUnattendContent.md index 1e8fddbaefe9..62d53a7cdd11 100644 --- a/src/Compute/Compute/help/Add-AzVmssAdditionalUnattendContent.md +++ b/src/Compute/Compute/help/Add-AzVmssAdditionalUnattendContent.md @@ -16,7 +16,7 @@ Adds information to the unattended Windows Setup answer file. ``` Add-AzVmssAdditionalUnattendContent [-VirtualMachineScaleSet] [[-PassName] ] [[-ComponentName] ] [[-SettingName] ] - [[-Content] ] [-DefaultProfile ] + [[-Content] ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -98,6 +98,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SettingName Specifies the name of the setting to which the content applies. The acceptable values for this parameter are:: diff --git a/src/Compute/Compute/help/Add-AzVmssDataDisk.md b/src/Compute/Compute/help/Add-AzVmssDataDisk.md index 6d323715f699..7d2f4e8a7c70 100644 --- a/src/Compute/Compute/help/Add-AzVmssDataDisk.md +++ b/src/Compute/Compute/help/Add-AzVmssDataDisk.md @@ -17,7 +17,7 @@ Add-AzVmssDataDisk [-VirtualMachineScaleSet] [[-Name] [[-Caching] ] [-WriteAccelerator] [-CreateOption ] [-DeleteOption ] [-DiskSizeGB ] [-DiskIOPSReadWrite ] [-DiskMBpsReadWrite ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -190,6 +190,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -StorageAccountType Specifies the storage account type of the disk. diff --git a/src/Compute/Compute/help/Add-AzVmssDiagnosticsExtension.md b/src/Compute/Compute/help/Add-AzVmssDiagnosticsExtension.md index 63b20f289faa..c8429fc9a4ce 100644 --- a/src/Compute/Compute/help/Add-AzVmssDiagnosticsExtension.md +++ b/src/Compute/Compute/help/Add-AzVmssDiagnosticsExtension.md @@ -17,7 +17,7 @@ Adds a diagnostics extension to the VMSS. Add-AzVmssDiagnosticsExtension [-VirtualMachineScaleSet] [-SettingFilePath] [[-ProtectedSettingFilePath] ] [[-Name] ] [[-TypeHandlerVersion] ] [[-AutoUpgradeMinorVersion] ] [-Force] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -94,6 +94,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProtectedSettingFilePath Specifies the path of the private configuration file. diff --git a/src/Compute/Compute/help/Add-AzVmssExtension.md b/src/Compute/Compute/help/Add-AzVmssExtension.md index cdb50c0c080d..73dfe493ce88 100644 --- a/src/Compute/Compute/help/Add-AzVmssExtension.md +++ b/src/Compute/Compute/help/Add-AzVmssExtension.md @@ -18,7 +18,7 @@ Add-AzVmssExtension [-VirtualMachineScaleSet] [[-Name [[-Publisher] ] [[-Type] ] [[-TypeHandlerVersion] ] [[-AutoUpgradeMinorVersion] ] [[-Setting] ] [[-ProtectedSetting] ] [-EnableAutomaticUpgrade ] [-ForceUpdateTag ] [-ProvisionAfterExtension ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -160,6 +160,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProtectedSetting Specifies private configuration for the extension, as a string. This cmdlet encrypts the private configuration. diff --git a/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md b/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md index a26f7e5065cf..7537bd9d6eb2 100644 --- a/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md +++ b/src/Compute/Compute/help/Add-AzVmssGalleryApplication.md @@ -15,7 +15,7 @@ Add a GalleryApplication object to the PSVirtualMachineProfile object. ``` Add-AzVmssGalleryApplication -VirtualMachineScaleSetVM -GalleryApplication [-TreatFailureAsDeploymentFailure] [-Order ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -80,6 +80,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 +``` + ### -TreatFailureAsDeploymentFailure If true, any failure for any operation in the VmApplication will fail the deployment. Defaults to false if not specified. diff --git a/src/Compute/Compute/help/Add-AzVmssNetworkInterfaceConfiguration.md b/src/Compute/Compute/help/Add-AzVmssNetworkInterfaceConfiguration.md index fbbd9338054c..87855a001046 100644 --- a/src/Compute/Compute/help/Add-AzVmssNetworkInterfaceConfiguration.md +++ b/src/Compute/Compute/help/Add-AzVmssNetworkInterfaceConfiguration.md @@ -18,7 +18,7 @@ Add-AzVmssNetworkInterfaceConfiguration [-VirtualMachineScaleSet] ] [[-Id] ] [[-IpConfiguration] ] [-EnableAcceleratedNetworking] [-EnableIPForwarding] [-NetworkSecurityGroupId ] [-DnsSettingsDnsServer ] [-NetworkApiVersion ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -185,6 +185,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet Specifies the VMSS object. You can use the [New-AzVmssConfig](./New-AzVmssConfig.md) cmdlet to create the object. diff --git a/src/Compute/Compute/help/Add-AzVmssRunCommand.md b/src/Compute/Compute/help/Add-AzVmssRunCommand.md index 3ae917554db4..1c354ae4b90c 100644 --- a/src/Compute/Compute/help/Add-AzVmssRunCommand.md +++ b/src/Compute/Compute/help/Add-AzVmssRunCommand.md @@ -19,7 +19,7 @@ Add-AzVmssRunCommand [-ResourceGroupName] [-VMScaleSetName] [- [-TimeOutInSeconds ] [-ErrorBlobUri ] [-OutputBlobUri ] [-RunAsUser ] [-RunAsPassword ] [-Parameter ] [-ProtectedParameter ] [-AsyncExecution ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter @@ -29,7 +29,7 @@ Add-AzVmssRunCommand [-CommandId ] -Name [-ScriptPath ] [-RunAsUser ] [-RunAsPassword ] [-Parameter ] [-ProtectedParameter ] [-AsyncExecution ] [-VirtualMachineScaleSetVM] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -181,6 +181,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 +``` + ### -ProtectedParameter The parameters used by the script. diff --git a/src/Compute/Compute/help/Add-AzVmssSecret.md b/src/Compute/Compute/help/Add-AzVmssSecret.md index 8b9044f4d40c..7b41afd9ce7b 100644 --- a/src/Compute/Compute/help/Add-AzVmssSecret.md +++ b/src/Compute/Compute/help/Add-AzVmssSecret.md @@ -16,7 +16,7 @@ Adds a secret to a VMSS. ``` Add-AzVmssSecret [-VirtualMachineScaleSet] [[-SourceVaultId] ] [[-VaultCertificate] ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -82,6 +82,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 +``` + ### -SourceVaultId Specifies the resource ID of the Key Vault that contains the certificates that you can add to the virtual machine. This value also acts as the key for adding multiple certificates. diff --git a/src/Compute/Compute/help/Add-AzVmssSshPublicKey.md b/src/Compute/Compute/help/Add-AzVmssSshPublicKey.md index 24b7f9d36974..6b56a6d096ca 100644 --- a/src/Compute/Compute/help/Add-AzVmssSshPublicKey.md +++ b/src/Compute/Compute/help/Add-AzVmssSshPublicKey.md @@ -15,7 +15,7 @@ Adds SSH public keys to the VMSS. ``` Add-AzVmssSshPublicKey [-VirtualMachineScaleSet] [[-Path] ] - [[-KeyData] ] [-DefaultProfile ] + [[-KeyData] ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -82,6 +82,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet Specifies the VMSS object. You can use the [New-AzVmssConfig](./New-AzVmssConfig.md) cmdlet to create the object. diff --git a/src/Compute/Compute/help/Add-AzVmssVMDataDisk.md b/src/Compute/Compute/help/Add-AzVmssVMDataDisk.md index 8323dfb3c624..ce6f700037dd 100644 --- a/src/Compute/Compute/help/Add-AzVmssVMDataDisk.md +++ b/src/Compute/Compute/help/Add-AzVmssVMDataDisk.md @@ -16,7 +16,7 @@ Adds a data disk to a Vmss VM. Add-AzVmssVMDataDisk [-VirtualMachineScaleSetVM] [-Lun] [-CreateOption] [-ManagedDiskId] [-StorageAccountType ] [-DiskEncryptionSetId ] [-Caching ] [-DiskSizeInGB ] [-WriteAccelerator] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -163,6 +163,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -StorageAccountType Specifies the storage account type of managed disk. diff --git a/src/Compute/Compute/help/Add-AzVmssWinRMListener.md b/src/Compute/Compute/help/Add-AzVmssWinRMListener.md index e20bd7e64714..2082c9d81086 100644 --- a/src/Compute/Compute/help/Add-AzVmssWinRMListener.md +++ b/src/Compute/Compute/help/Add-AzVmssWinRMListener.md @@ -15,7 +15,7 @@ Adds a WinRM listener to the VMSS. ``` Add-AzVmssWinRMListener [-VirtualMachineScaleSet] [[-Protocol] ] - [[-CertificateUrl] ] [-DefaultProfile ] + [[-CertificateUrl] ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -66,6 +66,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 +``` + ### -Protocol Specifies the protocol of the WinRM listener. The acceptable values for this parameter are: diff --git a/src/Compute/Compute/help/Az.Compute.md b/src/Compute/Compute/help/Az.Compute.md index 5311d11c1692..82b815023240 100644 --- a/src/Compute/Compute/help/Az.Compute.md +++ b/src/Compute/Compute/help/Az.Compute.md @@ -248,6 +248,9 @@ Grants an access to a disk. ### [Grant-AzSnapshotAccess](Grant-AzSnapshotAccess.md) Grants an access to a snapshot. +### [Invoke-AzSpotPlacementRecommender](Invoke-AzSpotPlacementRecommender.md) +Generates placement scores for Spot VM skus. + ### [Invoke-AzVMInstallPatch](Invoke-AzVMInstallPatch.md) Installs patches on the VM diff --git a/src/Compute/Compute/help/ConvertTo-AzVMManagedDisk.md b/src/Compute/Compute/help/ConvertTo-AzVMManagedDisk.md index e3c1f03e2219..1f735251a012 100644 --- a/src/Compute/Compute/help/ConvertTo-AzVMManagedDisk.md +++ b/src/Compute/Compute/help/ConvertTo-AzVMManagedDisk.md @@ -14,7 +14,7 @@ Converts a virtual machine with blob-based disks to a virtual machine with manag ``` ConvertTo-AzVMManagedDisk [-ResourceGroupName] [-VMName] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -63,6 +63,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Disable-AzVMDiskEncryption.md b/src/Compute/Compute/help/Disable-AzVMDiskEncryption.md index 31478cd8754a..49e05f7b149e 100644 --- a/src/Compute/Compute/help/Disable-AzVMDiskEncryption.md +++ b/src/Compute/Compute/help/Disable-AzVMDiskEncryption.md @@ -17,7 +17,7 @@ Disables encryption on an IaaS virtual machine. Disable-AzVMDiskEncryption [-ResourceGroupName] [-VMName] [[-VolumeType] ] [[-Name] ] [[-TypeHandlerVersion] ] [-Force] [-DisableAutoUpgradeMinorVersion] [-ExtensionType ] [-ExtensionPublisherName ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -140,6 +140,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the resource group name of the virtual machine. diff --git a/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md b/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md index 1e3146fcd737..9c6b39074261 100644 --- a/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md +++ b/src/Compute/Compute/help/Disable-AzVmssDiskEncryption.md @@ -15,7 +15,7 @@ Disables disk encryption on a VM scale set. ``` Disable-AzVmssDiskEncryption [-ResourceGroupName] [-VMScaleSetName] [[-ExtensionName] ] [-VolumeType ] [-ForceUpdate] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -120,6 +120,21 @@ Accept pipeline input: True (ByPropertyName) 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 resource group name. diff --git a/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md b/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md index 141fe8dd0065..d5eef973a11f 100644 --- a/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md +++ b/src/Compute/Compute/help/Export-AzLogAnalyticRequestRateByInterval.md @@ -16,7 +16,7 @@ Export logs that show Api requests made by this subscription in the given time w Export-AzLogAnalyticRequestRateByInterval [-Location] [-FromTime] [-ToTime] [-BlobContainerSasUri] [-IntervalLength] [-GroupByOperationName] [-GroupByResourceName] [-GroupByThrottlePolicy] [-GroupByApplicationId] [-GroupByUserAgent] [-AsJob] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -262,6 +262,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 +``` + ### -ToTime To time of the query diff --git a/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md b/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md index e014060d65f2..9a058b3bbf5d 100644 --- a/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md +++ b/src/Compute/Compute/help/Export-AzLogAnalyticThrottledRequest.md @@ -16,7 +16,7 @@ Export logs that show total throttled Api requests for this subscription in the Export-AzLogAnalyticThrottledRequest [-Location] [-FromTime] [-ToTime] [-BlobContainerSasUri] [-GroupByOperationName] [-GroupByResourceName] [-GroupByThrottlePolicy] [-GroupByApplicationId] [-GroupByUserAgent] [-AsJob] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -216,6 +216,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 +``` + ### -ToTime To time of the query diff --git a/src/Compute/Compute/help/Get-AzAvailabilitySet.md b/src/Compute/Compute/help/Get-AzAvailabilitySet.md index eb3b5d712c5d..c1912b180152 100644 --- a/src/Compute/Compute/help/Get-AzAvailabilitySet.md +++ b/src/Compute/Compute/help/Get-AzAvailabilitySet.md @@ -15,7 +15,7 @@ Gets Azure availability sets in a resource group. ``` Get-AzAvailabilitySet [[-ResourceGroupName] ] [[-Name] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -223,6 +223,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzCapacityReservation.md b/src/Compute/Compute/help/Get-AzCapacityReservation.md index c1a79efe1c15..c3ec38cea821 100644 --- a/src/Compute/Compute/help/Get-AzCapacityReservation.md +++ b/src/Compute/Compute/help/Get-AzCapacityReservation.md @@ -14,7 +14,7 @@ Gets the properties of Capacity Reservation resources from a Capacity Reservatio ``` Get-AzCapacityReservation -ResourceGroupName -ReservationGroupName [-Name ] - [-InstanceView] [-DefaultProfile ] + [-InstanceView] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -84,6 +84,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 +``` + ### -ReservationGroupName Name of the Capacity Reservation Group that the capacity reservation resource is in. diff --git a/src/Compute/Compute/help/Get-AzCapacityReservationGroup.md b/src/Compute/Compute/help/Get-AzCapacityReservationGroup.md index bf826972607b..a00f7dfdb774 100644 --- a/src/Compute/Compute/help/Get-AzCapacityReservationGroup.md +++ b/src/Compute/Compute/help/Get-AzCapacityReservationGroup.md @@ -15,13 +15,13 @@ Gets the properties of Capacity Reservation Groups ### DefaultParameterSet (Default) ``` Get-AzCapacityReservationGroup [-ResourceGroupName ] [-Name ] [-InstanceView] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ResourceIDParameterSet ``` Get-AzCapacityReservationGroup -ResourceId [-InstanceView] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -90,6 +90,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzComputeResourceSku.md b/src/Compute/Compute/help/Get-AzComputeResourceSku.md index b27233d8701b..9b99ed206ee1 100644 --- a/src/Compute/Compute/help/Get-AzComputeResourceSku.md +++ b/src/Compute/Compute/help/Get-AzComputeResourceSku.md @@ -14,7 +14,7 @@ List all compute resource Skus ``` Get-AzComputeResourceSku [[-Location] ] [-EdgeZone ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -76,6 +76,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### 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). diff --git a/src/Compute/Compute/help/Get-AzDisk.md b/src/Compute/Compute/help/Get-AzDisk.md index 30fc7a67dc08..9aa8452630e5 100644 --- a/src/Compute/Compute/help/Get-AzDisk.md +++ b/src/Compute/Compute/help/Get-AzDisk.md @@ -14,7 +14,7 @@ Gets the properties of a Managed disk. ``` Get-AzDisk [[-ResourceGroupName] ] [[-DiskName] ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -223,6 +223,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzDiskAccess.md b/src/Compute/Compute/help/Get-AzDiskAccess.md index 081dd2fdaf7d..90a3e9ef775e 100644 --- a/src/Compute/Compute/help/Get-AzDiskAccess.md +++ b/src/Compute/Compute/help/Get-AzDiskAccess.md @@ -14,13 +14,13 @@ Gets the properties of Disk Accesses ### DefaultParameterSet (Default) ``` Get-AzDiskAccess [[-ResourceGroupName] ] [[-Name] ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### ResourceIDParameterSet ``` Get-AzDiskAccess [-ResourceId] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -186,6 +186,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md b/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md index 2b0ffc817d42..2fe9952643f2 100644 --- a/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md +++ b/src/Compute/Compute/help/Get-AzDiskEncryptionSet.md @@ -14,7 +14,7 @@ Get or list disk encryption sets. ``` Get-AzDiskEncryptionSet [[-ResourceGroupName] ] [[-Name] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -147,6 +147,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md b/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md index 4c70e530c502..f2629a884660 100644 --- a/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md +++ b/src/Compute/Compute/help/Get-AzDiskEncryptionSetAssociatedResource.md @@ -13,7 +13,7 @@ Gets the list of resources associated with the specified disk encryption set. ``` Get-AzDiskEncryptionSetAssociatedResource [-ResourceGroupName] [-DiskEncryptionSetName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -65,6 +65,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzGallery.md b/src/Compute/Compute/help/Get-AzGallery.md index 04c1d7ac1d75..f71ec0f386b9 100644 --- a/src/Compute/Compute/help/Get-AzGallery.md +++ b/src/Compute/Compute/help/Get-AzGallery.md @@ -15,25 +15,25 @@ Get or list galleries. ### DefaultParameter (Default) ``` Get-AzGallery [[-ResourceGroupName] ] [[-Name] ] [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ResourceIdParameter ``` Get-AzGallery [-ResourceId] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### SharedGalleryParameterSet ``` Get-AzGallery [-GalleryUniqueName ] [-Scope ] -Location - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### CommunityGalleryParameterSet ``` Get-AzGallery [-GalleryPublicName ] [-Location ] [-Community] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -302,6 +302,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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. diff --git a/src/Compute/Compute/help/Get-AzGalleryApplication.md b/src/Compute/Compute/help/Get-AzGalleryApplication.md index b8c9158f40c1..bc56cb81bdd6 100644 --- a/src/Compute/Compute/help/Get-AzGalleryApplication.md +++ b/src/Compute/Compute/help/Get-AzGalleryApplication.md @@ -15,20 +15,20 @@ Retrieves information about a gallery Application Definition. ### List (Default) ``` Get-AzGalleryApplication -GalleryName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzGalleryApplication -GalleryName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzGalleryApplication -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -114,6 +114,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. diff --git a/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md index d3e8648a9ce0..9e7aa684d455 100644 --- a/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/Get-AzGalleryApplicationVersion.md @@ -16,20 +16,20 @@ Retrieves information about a gallery Application Version. ``` Get-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name -ResourceGroupName [-SubscriptionId ] [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzGalleryApplicationVersion -InputObject [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -145,6 +145,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. diff --git a/src/Compute/Compute/help/Get-AzGalleryImageDefinition.md b/src/Compute/Compute/help/Get-AzGalleryImageDefinition.md index c865f6560ad3..0085d2e9ee1b 100644 --- a/src/Compute/Compute/help/Get-AzGalleryImageDefinition.md +++ b/src/Compute/Compute/help/Get-AzGalleryImageDefinition.md @@ -15,32 +15,32 @@ Get or list gallery image definitions. ### DefaultParameter (Default) ``` Get-AzGalleryImageDefinition [-ResourceGroupName] [-GalleryName] [[-Name] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### SharedGalleryParameterSet ``` Get-AzGalleryImageDefinition [[-Name] ] -GalleryUniqueName [-Scope ] - -Location [-DefaultProfile ] + -Location [-DefaultProfile ] [-ProgressAction ] [] ``` ### CommunityGalleryParameterSet ``` Get-AzGalleryImageDefinition [[-Name] ] -GalleryPublicName -Location - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ResourceIdParameter ``` Get-AzGalleryImageDefinition [-ResourceId] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### ListCommunityGalleryParameterSet ``` Get-AzGalleryImageDefinition [-Location ] [-Community] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -354,6 +354,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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. diff --git a/src/Compute/Compute/help/Get-AzGalleryImageVersion.md b/src/Compute/Compute/help/Get-AzGalleryImageVersion.md index 6e609b83b2f6..394d839faeb2 100644 --- a/src/Compute/Compute/help/Get-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/Get-AzGalleryImageVersion.md @@ -16,33 +16,33 @@ Get or list gallery image versions. ``` Get-AzGalleryImageVersion [-ResourceGroupName] [-GalleryName] [-GalleryImageDefinitionName] [[-Name] ] [-ExpandReplicationStatus] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### SharedGalleryParameterSet ``` Get-AzGalleryImageVersion [-GalleryImageDefinitionName] [[-Name] ] [-ExpandReplicationStatus] -GalleryUniqueName [-Scope ] -Location [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### CommunityGalleryParameterSet ``` Get-AzGalleryImageVersion [-GalleryImageDefinitionName] [[-Name] ] [-ExpandReplicationStatus] -GalleryPublicName -Location [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### ResourceIdParameter ``` Get-AzGalleryImageVersion [-ResourceId] [-ExpandReplicationStatus] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ListCommunityGalleryParameterSet ``` Get-AzGalleryImageVersion [-ExpandReplicationStatus] [-Location ] [-Community] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -381,6 +381,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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. diff --git a/src/Compute/Compute/help/Get-AzHost.md b/src/Compute/Compute/help/Get-AzHost.md index b8478a64ae4f..af9a9ae5112a 100644 --- a/src/Compute/Compute/help/Get-AzHost.md +++ b/src/Compute/Compute/help/Get-AzHost.md @@ -15,13 +15,13 @@ Get or list hosts. ### DefaultParameter (Default) ``` Get-AzHost [-ResourceGroupName] [-HostGroupName] [[-Name] ] [-InstanceView] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ResourceIdParameter ``` Get-AzHost [-ResourceId] [-InstanceView] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -207,6 +207,21 @@ Accept pipeline input: True (ByPropertyName) 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 diff --git a/src/Compute/Compute/help/Get-AzHostGroup.md b/src/Compute/Compute/help/Get-AzHostGroup.md index 11007fa667d6..8020ad18fc0b 100644 --- a/src/Compute/Compute/help/Get-AzHostGroup.md +++ b/src/Compute/Compute/help/Get-AzHostGroup.md @@ -15,13 +15,13 @@ Get or list hosts. ### DefaultParameter (Default) ``` Get-AzHostGroup [[-ResourceGroupName] ] [[-Name] ] [-InstanceView] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ResourceIdParameter ``` Get-AzHostGroup [-ResourceId] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -125,6 +125,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Get-AzHostSize.md b/src/Compute/Compute/help/Get-AzHostSize.md index e60cee4a9635..c367e8948e9c 100644 --- a/src/Compute/Compute/help/Get-AzHostSize.md +++ b/src/Compute/Compute/help/Get-AzHostSize.md @@ -14,7 +14,7 @@ Get List of possible Host Sizes. ``` Get-AzHostSize [-ResourceGroupName] [-HostGroupName] [[-HostName] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -80,6 +80,21 @@ Accept pipeline input: True (ByPropertyName) 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 Name of Resource Group. diff --git a/src/Compute/Compute/help/Get-AzImage.md b/src/Compute/Compute/help/Get-AzImage.md index 42a6e8ef3045..260a364869bb 100644 --- a/src/Compute/Compute/help/Get-AzImage.md +++ b/src/Compute/Compute/help/Get-AzImage.md @@ -14,7 +14,7 @@ Gets the properties of an image. ``` Get-AzImage [[-ResourceGroupName] ] [[-ImageName] ] [[-Expand] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -204,6 +204,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzProximityPlacementGroup.md b/src/Compute/Compute/help/Get-AzProximityPlacementGroup.md index e5af48c36baa..e1b32b55b3fc 100644 --- a/src/Compute/Compute/help/Get-AzProximityPlacementGroup.md +++ b/src/Compute/Compute/help/Get-AzProximityPlacementGroup.md @@ -15,13 +15,13 @@ Get or list Proximity Placement Group resource(s). ### DefaultParameter (Default) ``` Get-AzProximityPlacementGroup [[-ResourceGroupName] ] [[-Name] ] [-ColocationStatus] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ResourceIdParameter ``` Get-AzProximityPlacementGroup [-ColocationStatus] [-ResourceId] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -125,6 +125,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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. diff --git a/src/Compute/Compute/help/Get-AzRemoteDesktopFile.md b/src/Compute/Compute/help/Get-AzRemoteDesktopFile.md index 532576ab866f..b1a978802175 100644 --- a/src/Compute/Compute/help/Get-AzRemoteDesktopFile.md +++ b/src/Compute/Compute/help/Get-AzRemoteDesktopFile.md @@ -16,13 +16,13 @@ Gets an .rdp file. ### Download ``` Get-AzRemoteDesktopFile [-ResourceGroupName] [-Name] [-LocalPath] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Launch ``` Get-AzRemoteDesktopFile [-ResourceGroupName] [-Name] [[-LocalPath] ] [-Launch] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -112,6 +112,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzRestorePoint.md b/src/Compute/Compute/help/Get-AzRestorePoint.md index 67eb20e8e490..da58f7b5d75d 100644 --- a/src/Compute/Compute/help/Get-AzRestorePoint.md +++ b/src/Compute/Compute/help/Get-AzRestorePoint.md @@ -14,7 +14,7 @@ Command to get the Restore Point ``` Get-AzRestorePoint [-ResourceGroupName] [-RestorePointCollectionName] [-Name] - [-InstanceView] [-DefaultProfile ] + [-InstanceView] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -77,6 +77,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource Group name diff --git a/src/Compute/Compute/help/Get-AzRestorePointCollection.md b/src/Compute/Compute/help/Get-AzRestorePointCollection.md index 7b63e08d0fe6..6eb19afcb083 100644 --- a/src/Compute/Compute/help/Get-AzRestorePointCollection.md +++ b/src/Compute/Compute/help/Get-AzRestorePointCollection.md @@ -14,7 +14,7 @@ Get a Restore Point Collection ``` Get-AzRestorePointCollection [-ResourceGroupName] [-Name] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -61,6 +61,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource Group Name diff --git a/src/Compute/Compute/help/Get-AzSnapshot.md b/src/Compute/Compute/help/Get-AzSnapshot.md index fa32ead725a8..d905dafa1b54 100644 --- a/src/Compute/Compute/help/Get-AzSnapshot.md +++ b/src/Compute/Compute/help/Get-AzSnapshot.md @@ -14,7 +14,7 @@ Gets the properties of a snapshot ``` Get-AzSnapshot [[-ResourceGroupName] ] [[-SnapshotName] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -219,6 +219,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzSshKey.md b/src/Compute/Compute/help/Get-AzSshKey.md index 959d996f20c0..e5e114fb73de 100644 --- a/src/Compute/Compute/help/Get-AzSshKey.md +++ b/src/Compute/Compute/help/Get-AzSshKey.md @@ -15,13 +15,13 @@ Gets the properties of SSH Public Key resources. ### DefaultParameterSet (Default) ``` Get-AzSshKey [-ResourceGroupName ] [-Name ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Get-AzSshKey -ResourceId [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -82,6 +82,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzVM.md b/src/Compute/Compute/help/Get-AzVM.md index 1383e10e423e..9df2a499376a 100644 --- a/src/Compute/Compute/help/Get-AzVM.md +++ b/src/Compute/Compute/help/Get-AzVM.md @@ -16,25 +16,25 @@ Gets the properties of a virtual machine. ### DefaultParamSet (Default) ``` Get-AzVM [[-ResourceGroupName] ] [[-Name] ] [-Status] [-UserData] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetVirtualMachineInResourceGroupParamSet ``` Get-AzVM [-ResourceGroupName] [-Name] [-Status] [-DisplayHint ] [-UserData] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ListLocationVirtualMachinesParamSet ``` Get-AzVM -Location [-Status] [-UserData] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetVirtualMachineById ``` Get-AzVM [-Status] -ResourceId [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -339,6 +339,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzVMADDomainExtension.md b/src/Compute/Compute/help/Get-AzVMADDomainExtension.md index ef01ac9acab3..d2a094465c59 100644 --- a/src/Compute/Compute/help/Get-AzVMADDomainExtension.md +++ b/src/Compute/Compute/help/Get-AzVMADDomainExtension.md @@ -15,7 +15,7 @@ Gets information about an AD domain extension. ``` Get-AzVMADDomainExtension [-ResourceGroupName] [-VMName] [-Name] [-Status] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -66,6 +66,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzVMAEMExtension.md b/src/Compute/Compute/help/Get-AzVMAEMExtension.md index a04c534fdc9f..6b420dbbeb5b 100644 --- a/src/Compute/Compute/help/Get-AzVMAEMExtension.md +++ b/src/Compute/Compute/help/Get-AzVMAEMExtension.md @@ -15,7 +15,7 @@ Gets information about the AEM extension. ``` Get-AzVMAEMExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Status] - [[-OSType] ] [-DefaultProfile ] + [[-OSType] ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -81,6 +81,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 Specifies the name of the resource group of a virtual machine. This cmdlet gets information for the AEM extension on that virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMAccessExtension.md b/src/Compute/Compute/help/Get-AzVMAccessExtension.md index eb675502ef36..8ad77a0ea210 100644 --- a/src/Compute/Compute/help/Get-AzVMAccessExtension.md +++ b/src/Compute/Compute/help/Get-AzVMAccessExtension.md @@ -15,7 +15,7 @@ Gets information about the VMAccess extension. ``` Get-AzVMAccessExtension [-ResourceGroupName] [-VMName] [-Name] [-Status] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -69,6 +69,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMBootDiagnosticsData.md b/src/Compute/Compute/help/Get-AzVMBootDiagnosticsData.md index b339c0ab2af9..17dc1954e47e 100644 --- a/src/Compute/Compute/help/Get-AzVMBootDiagnosticsData.md +++ b/src/Compute/Compute/help/Get-AzVMBootDiagnosticsData.md @@ -16,13 +16,13 @@ Gets boot diagnostics data for a virtual machine. ### WindowsParamSet (Default) ``` Get-AzVMBootDiagnosticsData [-ResourceGroupName] [-Name] [-Windows] [-LocalPath] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### LinuxParamSet ``` Get-AzVMBootDiagnosticsData [-ResourceGroupName] [-Name] [-Linux] [[-LocalPath] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -113,6 +113,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMChefExtension.md b/src/Compute/Compute/help/Get-AzVMChefExtension.md index a52784c73112..ecabeeb631bc 100644 --- a/src/Compute/Compute/help/Get-AzVMChefExtension.md +++ b/src/Compute/Compute/help/Get-AzVMChefExtension.md @@ -16,13 +16,13 @@ Gets information about a Chef extension. ### Linux ``` Get-AzVMChefExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Status] [-Linux] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Windows ``` Get-AzVMChefExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Status] [-Windows] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -91,6 +91,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group that contains the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMCustomScriptExtension.md b/src/Compute/Compute/help/Get-AzVMCustomScriptExtension.md index aff774fc0af9..f898c5f94ba1 100644 --- a/src/Compute/Compute/help/Get-AzVMCustomScriptExtension.md +++ b/src/Compute/Compute/help/Get-AzVMCustomScriptExtension.md @@ -15,7 +15,7 @@ Gets information about a custom script extension. ``` Get-AzVMCustomScriptExtension [-ResourceGroupName] [-VMName] [-Name] [-Status] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -69,6 +69,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md b/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md index e9f1b6785aa4..ad06365c2505 100644 --- a/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md +++ b/src/Compute/Compute/help/Get-AzVMDiagnosticsExtension.md @@ -15,7 +15,7 @@ Gets the settings of the Diagnostics extension on a virtual machine. ``` Get-AzVMDiagnosticsExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Status] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -73,6 +73,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMDiskEncryptionStatus.md b/src/Compute/Compute/help/Get-AzVMDiskEncryptionStatus.md index 8270b3c4f2f3..36e8287838a9 100644 --- a/src/Compute/Compute/help/Get-AzVMDiskEncryptionStatus.md +++ b/src/Compute/Compute/help/Get-AzVMDiskEncryptionStatus.md @@ -16,7 +16,7 @@ Gets the encryption status of the virtual machine. ``` Get-AzVMDiskEncryptionStatus [-ResourceGroupName] [-VMName] [[-Name] ] [-ExtensionType ] [-ExtensionPublisherName ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -93,6 +93,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMDscExtension.md b/src/Compute/Compute/help/Get-AzVMDscExtension.md index 1854ed2fd75c..c27dc0813a91 100644 --- a/src/Compute/Compute/help/Get-AzVMDscExtension.md +++ b/src/Compute/Compute/help/Get-AzVMDscExtension.md @@ -16,13 +16,13 @@ Gets the settings of the DSC extension on a particular virtual machine. ### GetDscExtension (Default) ``` Get-AzVMDscExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Status] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### VMParameterSet ``` Get-AzVMDscExtension [-Status] [-VM ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -71,6 +71,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md b/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md index 0c47dbf58abd..718ed1398f20 100644 --- a/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md +++ b/src/Compute/Compute/help/Get-AzVMDscExtensionStatus.md @@ -16,13 +16,13 @@ Gets the status of the DSC extension handler for a virtual machine. ### GetDscExtension (Default) ``` Get-AzVMDscExtensionStatus [-ResourceGroupName] [-VMName] [[-Name] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### VMParameterSet ``` Get-AzVMDscExtensionStatus [-VM ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -76,6 +76,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMExtension.md b/src/Compute/Compute/help/Get-AzVMExtension.md index 57b28872160f..1d880f85a117 100644 --- a/src/Compute/Compute/help/Get-AzVMExtension.md +++ b/src/Compute/Compute/help/Get-AzVMExtension.md @@ -16,19 +16,19 @@ Gets properties of Virtual Machine Extensions installed on a virtual machine. ### GetExtensionParameterSet (Default) ``` Get-AzVMExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Status] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### VMParameterSet ``` Get-AzVMExtension [-Status] [-VMObject ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### ResourceIdParameterSet ``` Get-AzVMExtension [-Status] [-ResourceId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -178,6 +178,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Get-AzVMExtensionImage.md b/src/Compute/Compute/help/Get-AzVMExtensionImage.md index 31a17f16eb8d..223c5baf7452 100644 --- a/src/Compute/Compute/help/Get-AzVMExtensionImage.md +++ b/src/Compute/Compute/help/Get-AzVMExtensionImage.md @@ -15,7 +15,7 @@ Gets all versions for an Azure extension. ``` Get-AzVMExtensionImage -Location -PublisherName -Type [-FilterExpression ] - [-Version ] [-DefaultProfile ] + [-Version ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -155,6 +155,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublisherName Specifies the name of an extension publisher. To obtain an extension publisher, use the Get-AzVMImagePublisher cmdlet. diff --git a/src/Compute/Compute/help/Get-AzVMExtensionImageType.md b/src/Compute/Compute/help/Get-AzVMExtensionImageType.md index 720c5d083132..10c35e15e5a6 100644 --- a/src/Compute/Compute/help/Get-AzVMExtensionImageType.md +++ b/src/Compute/Compute/help/Get-AzVMExtensionImageType.md @@ -15,7 +15,7 @@ Gets the type of an Azure extension. ``` Get-AzVMExtensionImageType -Location -PublisherName - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -63,6 +63,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublisherName Specifies the name of a publisher of an extension. To obtain an extension publisher, use the Get-AzVMImagePublisher cmdlet. diff --git a/src/Compute/Compute/help/Get-AzVMImage.md b/src/Compute/Compute/help/Get-AzVMImage.md index 2a6003ccdbe3..c9cef4f59148 100644 --- a/src/Compute/Compute/help/Get-AzVMImage.md +++ b/src/Compute/Compute/help/Get-AzVMImage.md @@ -17,13 +17,13 @@ Gets all the versions of a VMImage. ``` Get-AzVMImage -Location [-EdgeZone ] -PublisherName -Offer -Skus [-Top ] [-OrderBy ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetVMImageDetail ``` Get-AzVMImage -Location [-EdgeZone ] -PublisherName -Offer -Skus - -Version [-DefaultProfile ] + -Version [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -174,6 +174,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublisherName Specifies the publisher of a VMImage. To obtain an image publisher, use the Get-AzVMImagePublisher cmdlet. diff --git a/src/Compute/Compute/help/Get-AzVMImageOffer.md b/src/Compute/Compute/help/Get-AzVMImageOffer.md index 6bdef9234dce..cf93981271f7 100644 --- a/src/Compute/Compute/help/Get-AzVMImageOffer.md +++ b/src/Compute/Compute/help/Get-AzVMImageOffer.md @@ -15,7 +15,7 @@ Gets VMImage offer types. ``` Get-AzVMImageOffer -Location [-EdgeZone ] -PublisherName - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -77,6 +77,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublisherName Specifies the name of a publisher of a VMImage. To obtain a publisher, use the Get-AzVMImagePublisher cmdlet. diff --git a/src/Compute/Compute/help/Get-AzVMImagePublisher.md b/src/Compute/Compute/help/Get-AzVMImagePublisher.md index 94673af18278..f5870ef89c04 100644 --- a/src/Compute/Compute/help/Get-AzVMImagePublisher.md +++ b/src/Compute/Compute/help/Get-AzVMImagePublisher.md @@ -15,7 +15,7 @@ Gets the VMImage publishers. ``` Get-AzVMImagePublisher -Location [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -62,6 +62,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### 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). diff --git a/src/Compute/Compute/help/Get-AzVMImageSku.md b/src/Compute/Compute/help/Get-AzVMImageSku.md index fe8278a53546..02bccf590318 100644 --- a/src/Compute/Compute/help/Get-AzVMImageSku.md +++ b/src/Compute/Compute/help/Get-AzVMImageSku.md @@ -15,7 +15,7 @@ Gets VMImage SKUs. ``` Get-AzVMImageSku -Location [-EdgeZone ] -PublisherName -Offer - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -92,6 +92,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublisherName Specifies the publisher of a VMImage. diff --git a/src/Compute/Compute/help/Get-AzVMRunCommand.md b/src/Compute/Compute/help/Get-AzVMRunCommand.md index b8186827229c..c726195260dd 100644 --- a/src/Compute/Compute/help/Get-AzVMRunCommand.md +++ b/src/Compute/Compute/help/Get-AzVMRunCommand.md @@ -14,7 +14,7 @@ Gets a specific Run Command or a list of Run Commands for a Virtual Machine ``` Get-AzVMRunCommand -ResourceGroupName -VMName [-RunCommandName ] [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -97,6 +97,21 @@ Accept pipeline input: True (ByPropertyName) 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 Name of the resource group for the run command. diff --git a/src/Compute/Compute/help/Get-AzVMRunCommandDocument.md b/src/Compute/Compute/help/Get-AzVMRunCommandDocument.md index 95bcba188c5b..0884c8464d37 100644 --- a/src/Compute/Compute/help/Get-AzVMRunCommandDocument.md +++ b/src/Compute/Compute/help/Get-AzVMRunCommandDocument.md @@ -14,7 +14,7 @@ Get a run command document. ``` Get-AzVMRunCommandDocument [-Location] [[-CommandId] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -83,6 +83,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### 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). diff --git a/src/Compute/Compute/help/Get-AzVMSize.md b/src/Compute/Compute/help/Get-AzVMSize.md index f40c79811dee..715777f1cc0d 100644 --- a/src/Compute/Compute/help/Get-AzVMSize.md +++ b/src/Compute/Compute/help/Get-AzVMSize.md @@ -16,19 +16,19 @@ Gets available virtual machine sizes. ### ListVirtualMachineSizeParamSet (Default) ``` Get-AzVMSize [-Location] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### ListAvailableSizesForAvailabilitySet ``` Get-AzVMSize [-ResourceGroupName] [-AvailabilitySetName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ListAvailableSizesForVirtualMachine ``` Get-AzVMSize [-ResourceGroupName] [-VMName] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -105,6 +105,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMSqlServerExtension.md b/src/Compute/Compute/help/Get-AzVMSqlServerExtension.md index f43a417a5d02..1d41d4c0e907 100644 --- a/src/Compute/Compute/help/Get-AzVMSqlServerExtension.md +++ b/src/Compute/Compute/help/Get-AzVMSqlServerExtension.md @@ -15,7 +15,7 @@ Gets the settings for a SQL Server extension on a virtual machine. ``` Get-AzVMSqlServerExtension [-ResourceGroupName] [-VMName] [[-Name] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -91,6 +91,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Get-AzVMUsage.md b/src/Compute/Compute/help/Get-AzVMUsage.md index 3d7769e55b31..55442f9d97f2 100644 --- a/src/Compute/Compute/help/Get-AzVMUsage.md +++ b/src/Compute/Compute/help/Get-AzVMUsage.md @@ -15,7 +15,7 @@ Gets the virtual machine core count usage for a location. ``` Get-AzVMUsage [-Location] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -62,6 +62,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### 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). diff --git a/src/Compute/Compute/help/Get-AzVmss.md b/src/Compute/Compute/help/Get-AzVmss.md index 0cc6a1df8d5d..6b32efc07cae 100644 --- a/src/Compute/Compute/help/Get-AzVmss.md +++ b/src/Compute/Compute/help/Get-AzVmss.md @@ -16,25 +16,25 @@ Gets the properties of a VMSS. ### DefaultParameter (Default) ``` Get-AzVmss [[-ResourceGroupName] ] [[-VMScaleSetName] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### FriendMethod ``` Get-AzVmss [[-ResourceGroupName] ] [[-VMScaleSetName] ] [-InstanceView] [-UserData] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### OSUpgradeHistoryMethodParameter ``` Get-AzVmss [[-ResourceGroupName] ] [[-VMScaleSetName] ] [-OSUpgradeHistory] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ResourceIdParameterSet ``` Get-AzVmss [-ResourceId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -315,6 +315,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 Specifies the name of the Resource Group of the VMSS. diff --git a/src/Compute/Compute/help/Get-AzVmssDiskEncryption.md b/src/Compute/Compute/help/Get-AzVmssDiskEncryption.md index a358364dade6..3ac87aea0be0 100644 --- a/src/Compute/Compute/help/Get-AzVmssDiskEncryption.md +++ b/src/Compute/Compute/help/Get-AzVmssDiskEncryption.md @@ -14,7 +14,7 @@ Shows the disk encryption status of a VM scale set. ``` Get-AzVmssDiskEncryption [[-ResourceGroupName] ] [[-VMScaleSetName] ] - [[-ExtensionName] ] [-DefaultProfile ] + [[-ExtensionName] ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -63,6 +63,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource group name of the virtual machine scale set diff --git a/src/Compute/Compute/help/Get-AzVmssRollingUpgrade.md b/src/Compute/Compute/help/Get-AzVmssRollingUpgrade.md index 9a14d2d2fb0e..284fd98d5320 100644 --- a/src/Compute/Compute/help/Get-AzVmssRollingUpgrade.md +++ b/src/Compute/Compute/help/Get-AzVmssRollingUpgrade.md @@ -14,7 +14,7 @@ Shows the status of the latest virtual machine scale set rolling upgrade. ``` Get-AzVmssRollingUpgrade [-ResourceGroupName] [-VMScaleSetName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -46,6 +46,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. diff --git a/src/Compute/Compute/help/Get-AzVmssSku.md b/src/Compute/Compute/help/Get-AzVmssSku.md index c03cff46dc7e..f948d3632c42 100644 --- a/src/Compute/Compute/help/Get-AzVmssSku.md +++ b/src/Compute/Compute/help/Get-AzVmssSku.md @@ -15,7 +15,7 @@ Gets the available SKUs for the VMSS. ``` Get-AzVmssSku [-ResourceGroupName] [-VMScaleSetName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -47,6 +47,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 Specifies the name of the resource group of the VMSS. diff --git a/src/Compute/Compute/help/Get-AzVmssVM.md b/src/Compute/Compute/help/Get-AzVmssVM.md index ea58620b7c0f..3bdce8a3a4ef 100644 --- a/src/Compute/Compute/help/Get-AzVmssVM.md +++ b/src/Compute/Compute/help/Get-AzVmssVM.md @@ -16,13 +16,13 @@ Gets the properties of a VMSS virtual machine. ### DefaultParameter (Default) ``` Get-AzVmssVM [[-ResourceGroupName] ] [[-VMScaleSetName] ] [[-InstanceId] ] [-UserData] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### FriendMethod ``` Get-AzVmssVM [[-ResourceGroupName] ] [[-VMScaleSetName] ] [[-InstanceId] ] - [-InstanceView] [-UserData] [-DefaultProfile ] + [-InstanceView] [-UserData] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -106,6 +106,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 Specifies the name of the Resource Group of the VMSS. diff --git a/src/Compute/Compute/help/Get-AzVmssVMDiskEncryption.md b/src/Compute/Compute/help/Get-AzVmssVMDiskEncryption.md index 1bda96ea4607..d1d8aae85a0a 100644 --- a/src/Compute/Compute/help/Get-AzVmssVMDiskEncryption.md +++ b/src/Compute/Compute/help/Get-AzVmssVMDiskEncryption.md @@ -14,7 +14,7 @@ Shows the disk encryption status of VMs in a VM scale set. ``` Get-AzVmssVMDiskEncryption [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] - [-ExtensionName ] [-DefaultProfile ] + [-ExtensionName ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -78,6 +78,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource group name of the virtual machine scale set. diff --git a/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md b/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md index f60d8990960e..c934c18ccf76 100644 --- a/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md +++ b/src/Compute/Compute/help/Get-AzVmssVMRunCommand.md @@ -15,7 +15,7 @@ The operation to get the VMSS VM run command. ``` Get-AzVmssVMRunCommand -ResourceGroupName -VMScaleSetName -InstanceId [-RunCommandName ] [-Expand ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -113,6 +113,21 @@ Accept pipeline input: True (ByPropertyName) 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 Name of the resource group for the run command. diff --git a/src/Compute/Compute/help/Grant-AzDiskAccess.md b/src/Compute/Compute/help/Grant-AzDiskAccess.md index 650813c484c3..1fc0f547470e 100644 --- a/src/Compute/Compute/help/Grant-AzDiskAccess.md +++ b/src/Compute/Compute/help/Grant-AzDiskAccess.md @@ -15,7 +15,7 @@ Grants an access to a disk. ``` Grant-AzDiskAccess [-ResourceGroupName] [-DiskName] [-Access] [[-DurationInSecond] ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -107,6 +107,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Grant-AzSnapshotAccess.md b/src/Compute/Compute/help/Grant-AzSnapshotAccess.md index eef653ad3193..66ee221f96af 100644 --- a/src/Compute/Compute/help/Grant-AzSnapshotAccess.md +++ b/src/Compute/Compute/help/Grant-AzSnapshotAccess.md @@ -15,7 +15,7 @@ Grants an access to a snapshot. ``` Grant-AzSnapshotAccess [-ResourceGroupName] [-SnapshotName] [-Access] [[-DurationInSecond] ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,6 +92,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute/help/Invoke-AzSpotPlacementRecommender.md new file mode 100644 index 000000000000..b3c0449fb9a5 --- /dev/null +++ b/src/Compute/Compute/help/Invoke-AzSpotPlacementRecommender.md @@ -0,0 +1,405 @@ +--- +external help file: Az.Compute-help.xml +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender +schema: 2.0.0 +--- + +# Invoke-AzSpotPlacementRecommender + +## SYNOPSIS +Generates placement scores for Spot VM skus. + +## SYNTAX + +### PostExpanded (Default) +``` +Invoke-AzSpotPlacementRecommender -Location [-SubscriptionId ] [-AvailabilityZone] + [-DesiredCount ] [-DesiredLocation ] [-DesiredSize ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### Post +``` +Invoke-AzSpotPlacementRecommender -Location [-SubscriptionId ] + -SpotPlacementRecommenderInput [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### PostViaIdentityExpanded +``` +Invoke-AzSpotPlacementRecommender -InputObject [-AvailabilityZone] [-DesiredCount ] + [-DesiredLocation ] [-DesiredSize ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### PostViaIdentity +``` +Invoke-AzSpotPlacementRecommender -InputObject + -SpotPlacementRecommenderInput [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Generates placement scores for Spot VM skus. + +## EXAMPLES + +### Example 1: Regionally scoped Spot Placement Recommender scores +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus DataNotFoundOrStale Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` + +Returns zonally scoped spot placement recommender scores for the input. + +### Example 3: Regionally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus High Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus High Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus High Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` + +Returns zonally scoped spot placement recommender scores for the input. + +## PARAMETERS + +### -AvailabilityZone +Defines if the scope is zonal or regional. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: PostExpanded, PostViaIdentityExpanded +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 +``` + +### -DesiredCount +Desired instance count per region/zone based on the scope. + +```yaml +Type: System.Int32 +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DesiredLocation +The desired regions + +```yaml +Type: System.String[] +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DesiredSize +The desired resource SKUs. +To construct, see NOTES section for DESIREDSIZE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.IResourceSize[] +Parameter Sets: PostExpanded, PostViaIdentityExpanded +Aliases: + +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.Compute.Models.IComputeIdentity +Parameter Sets: PostViaIdentityExpanded, PostViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, Post +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 +``` + +### -SpotPlacementRecommenderInput +SpotPlacementRecommender API Input. +To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput +Parameter Sets: Post, PostViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: PostExpanded, Post +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.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderInput + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ISpotPlacementRecommenderResponse + +## NOTES + +## RELATED LINKS diff --git a/src/Compute/Compute/help/Invoke-AzVMInstallPatch.md b/src/Compute/Compute/help/Invoke-AzVMInstallPatch.md index 5059e6b044e2..81e0907d5203 100644 --- a/src/Compute/Compute/help/Invoke-AzVMInstallPatch.md +++ b/src/Compute/Compute/help/Invoke-AzVMInstallPatch.md @@ -17,7 +17,7 @@ Installs patches on the VM Invoke-AzVMInstallPatch -ResourceGroupName -VMName [-Windows] -RebootSetting -MaximumDuration [-KBNumberToInclude ] [-KBNumberToExclude ] [-ExcludeKBsRequiringReboot] [-ClassificationToIncludeForWindows ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -26,7 +26,7 @@ Invoke-AzVMInstallPatch -ResourceGroupName -VMName [-Windows] Invoke-AzVMInstallPatch -ResourceGroupName -VMName [-Linux] -RebootSetting -MaximumDuration [-PackageNameMaskToInclude ] [-PackageNameMaskToExclude ] [-ClassificationToIncludeForLinux ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### WindowsResourceIDParameterSet @@ -34,7 +34,7 @@ Invoke-AzVMInstallPatch -ResourceGroupName -VMName [-Linux] -R Invoke-AzVMInstallPatch -ResourceId [-Windows] -RebootSetting -MaximumDuration [-KBNumberToInclude ] [-KBNumberToExclude ] [-ExcludeKBsRequiringReboot] [-ClassificationToIncludeForWindows ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### LinuxResourceIDParameterSet @@ -42,7 +42,7 @@ Invoke-AzVMInstallPatch -ResourceId [-Windows] -RebootSetting Invoke-AzVMInstallPatch -ResourceId [-Linux] -RebootSetting -MaximumDuration [-PackageNameMaskToInclude ] [-PackageNameMaskToExclude ] [-ClassificationToIncludeForLinux ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### WindowsInputObjectParameterSet @@ -50,7 +50,7 @@ Invoke-AzVMInstallPatch -ResourceId [-Linux] -RebootSetting -M Invoke-AzVMInstallPatch [-VM] [-Windows] -RebootSetting -MaximumDuration [-KBNumberToInclude ] [-KBNumberToExclude ] [-ExcludeKBsRequiringReboot] [-ClassificationToIncludeForWindows ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### LinuxInputObjectParameterSet @@ -58,7 +58,7 @@ Invoke-AzVMInstallPatch [-VM] [-Windows] -RebootSetting [-Linux] -RebootSetting -MaximumDuration [-PackageNameMaskToInclude ] [-PackageNameMaskToExclude ] [-ClassificationToIncludeForLinux ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -266,6 +266,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 +``` + ### -RebootSetting Defines when it is acceptable to reboot a VM during a software update operation. diff --git a/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md b/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md index 6e2243e5f24c..c13c204d5be7 100644 --- a/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md +++ b/src/Compute/Compute/help/Invoke-AzVMPatchAssessment.md @@ -14,20 +14,20 @@ Assess patch state of a virtual machine. ### DefaultParameterSet (Default) ``` Invoke-AzVMPatchAssessment [-ResourceGroupName] [-VMName] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Invoke-AzVMPatchAssessment [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` Invoke-AzVMPatchAssessment [-VM] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -74,6 +74,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Invoke-AzVMReimage.md b/src/Compute/Compute/help/Invoke-AzVMReimage.md index 11299fd7a548..7e33d1076f6d 100644 --- a/src/Compute/Compute/help/Invoke-AzVMReimage.md +++ b/src/Compute/Compute/help/Invoke-AzVMReimage.md @@ -15,7 +15,7 @@ Reimage an Azure virtual machine. ``` Invoke-AzVMReimage [-ResourceGroupName] [-VMName] [-TempDisk] [-AsJob] [-ExactVersion ] [-CustomData ] [-AdminPassword ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -132,6 +132,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Invoke-AzVMRunCommand.md b/src/Compute/Compute/help/Invoke-AzVMRunCommand.md index 5011a2842113..b4ce5d81df62 100644 --- a/src/Compute/Compute/help/Invoke-AzVMRunCommand.md +++ b/src/Compute/Compute/help/Invoke-AzVMRunCommand.md @@ -16,7 +16,7 @@ Run a command on the VM. ``` Invoke-AzVMRunCommand [-ResourceGroupName] [-VMName] -CommandId [-ScriptPath ] [-ScriptString ] [-Parameter ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,14 +24,14 @@ Invoke-AzVMRunCommand [-ResourceGroupName] [-VMName] -CommandI ``` Invoke-AzVMRunCommand -CommandId [-ScriptPath ] [-ScriptString ] [-Parameter ] [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### VMParameter ``` Invoke-AzVMRunCommand -CommandId [-ScriptPath ] [-ScriptString ] [-Parameter ] [-VM] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -124,6 +124,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. diff --git a/src/Compute/Compute/help/Invoke-AzVmssVMRunCommand.md b/src/Compute/Compute/help/Invoke-AzVmssVMRunCommand.md index 7fe9b09c85e3..6112f7a879d9 100644 --- a/src/Compute/Compute/help/Invoke-AzVmssVMRunCommand.md +++ b/src/Compute/Compute/help/Invoke-AzVmssVMRunCommand.md @@ -16,7 +16,7 @@ Run command on the Virtual Machine Scale Set VM. ``` Invoke-AzVmssVMRunCommand [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] -CommandId [-ScriptPath ] [-ScriptString ] [-Parameter ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,14 +24,14 @@ Invoke-AzVmssVMRunCommand [-ResourceGroupName] [-VMScaleSetName] [-ScriptPath ] [-ScriptString ] [-Parameter ] [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Invoke-AzVmssVMRunCommand -CommandId [-ScriptPath ] [-ScriptString ] [-Parameter ] [-VirtualMachineScaleSetVM] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -132,6 +132,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. diff --git a/src/Compute/Compute/help/New-AzAvailabilitySet.md b/src/Compute/Compute/help/New-AzAvailabilitySet.md index 93821bc73ede..e6feaa76f9cf 100644 --- a/src/Compute/Compute/help/New-AzAvailabilitySet.md +++ b/src/Compute/Compute/help/New-AzAvailabilitySet.md @@ -17,7 +17,7 @@ Creates an Azure availability set. New-AzAvailabilitySet [-ResourceGroupName] [-Name] [-Location] [[-PlatformUpdateDomainCount] ] [[-PlatformFaultDomainCount] ] [[-Sku] ] [-ProximityPlacementGroupId ] [-Tag ] [-AsJob] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -124,6 +124,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProximityPlacementGroupId The resource id of the Proximity Placement Group to use with this availability set. diff --git a/src/Compute/Compute/help/New-AzCapacityReservation.md b/src/Compute/Compute/help/New-AzCapacityReservation.md index cd949918b4fb..87e473f8cc29 100644 --- a/src/Compute/Compute/help/New-AzCapacityReservation.md +++ b/src/Compute/Compute/help/New-AzCapacityReservation.md @@ -15,7 +15,7 @@ Creates a Capacity Reservation resource in a Capacity Reservation Group ``` New-AzCapacityReservation -ResourceGroupName -ReservationGroupName -Name -Location -CapacityToReserve -Sku [-AsJob] [-Tag ] [-Zone ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -108,6 +108,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ReservationGroupName Specifies the name of the capacity reservation group. diff --git a/src/Compute/Compute/help/New-AzCapacityReservationGroup.md b/src/Compute/Compute/help/New-AzCapacityReservationGroup.md index beb5716456ed..b53680ce40b4 100644 --- a/src/Compute/Compute/help/New-AzCapacityReservationGroup.md +++ b/src/Compute/Compute/help/New-AzCapacityReservationGroup.md @@ -15,7 +15,7 @@ Creates a Capacity Reservation Group ``` New-AzCapacityReservationGroup -ResourceGroupName -Name -Location [-AsJob] [-Tag ] [-Zone ] [-SharingProfile ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,6 +92,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/New-AzDisk.md b/src/Compute/Compute/help/New-AzDisk.md index fda02654bf43..2a40a77e8eab 100644 --- a/src/Compute/Compute/help/New-AzDisk.md +++ b/src/Compute/Compute/help/New-AzDisk.md @@ -15,7 +15,7 @@ Creates a managed disk. ``` New-AzDisk [-ResourceGroupName] [-DiskName] [-Disk] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -183,6 +183,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/New-AzDiskAccess.md b/src/Compute/Compute/help/New-AzDiskAccess.md index 42cecf1016fe..31479c2f579c 100644 --- a/src/Compute/Compute/help/New-AzDiskAccess.md +++ b/src/Compute/Compute/help/New-AzDiskAccess.md @@ -13,7 +13,7 @@ Creates a Disk Access resource ``` New-AzDiskAccess [-ResourceGroupName] [-Name] [-Location] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -91,6 +91,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/New-AzDiskConfig.md b/src/Compute/Compute/help/New-AzDiskConfig.md index ba2ecfd8fe09..5e5b4cbda4d2 100644 --- a/src/Compute/Compute/help/New-AzDiskConfig.md +++ b/src/Compute/Compute/help/New-AzDiskConfig.md @@ -26,7 +26,7 @@ New-AzDiskConfig [[-SkuName] ] [-Tier ] [-LogicalSectorSize ] [-BurstingEnabled ] [-PublicNetworkAccess ] [-AcceleratedNetwork ] [-DataAccessAuthMode ] [-Architecture ] [-PerformancePlus ] [-OptimizedForFrequentAttach ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -524,6 +524,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicNetworkAccess Policy for controlling export on the disk. diff --git a/src/Compute/Compute/help/New-AzDiskEncryptionSet.md b/src/Compute/Compute/help/New-AzDiskEncryptionSet.md index c5d4a300c38f..b40cc105c3b0 100644 --- a/src/Compute/Compute/help/New-AzDiskEncryptionSet.md +++ b/src/Compute/Compute/help/New-AzDiskEncryptionSet.md @@ -14,7 +14,7 @@ Creates a disk encryption set. ``` New-AzDiskEncryptionSet [-ResourceGroupName] [-Name] [-InputObject] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -93,6 +93,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/New-AzDiskEncryptionSetConfig.md b/src/Compute/Compute/help/New-AzDiskEncryptionSetConfig.md index 7ed026ff4eb9..b2f128395041 100644 --- a/src/Compute/Compute/help/New-AzDiskEncryptionSetConfig.md +++ b/src/Compute/Compute/help/New-AzDiskEncryptionSetConfig.md @@ -17,7 +17,7 @@ New-AzDiskEncryptionSetConfig [-Location] [[-Tag] ] [[-Ident [[-SourceVaultId] ] [-KeyUrl ] [-EncryptionType ] [-RotationToLatestKeyVersionEnabled ] [-FederatedClientId ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -134,6 +134,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -RotationToLatestKeyVersionEnabled Gets or sets set this flag to true to enable auto-updating of this disk encryption diff --git a/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md b/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md index 9576feac24a0..5db63fa3f8c0 100644 --- a/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md +++ b/src/Compute/Compute/help/New-AzDiskPurchasePlanConfig.md @@ -14,7 +14,7 @@ Creates a PurchasePlan Object ``` New-AzDiskPurchasePlanConfig -Publisher -Name -Product [-PromotionCode ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -80,6 +80,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PromotionCode PromotionCode for Purchase Plan diff --git a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md index 67fec7e31d18..a382319d3c9f 100644 --- a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md +++ b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md @@ -21,7 +21,7 @@ New-AzDiskUpdateConfig [[-SkuName] ] [-Tier ] [-DiskIOPSReadOnly [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-BurstingEnabled ] [-PublicNetworkAccess ] [-AcceleratedNetwork ] [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -342,6 +342,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicNetworkAccess Policy for controlling export on the disk. diff --git a/src/Compute/Compute/help/New-AzGallery.md b/src/Compute/Compute/help/New-AzGallery.md index 319c49148537..8be31ef6a1ff 100644 --- a/src/Compute/Compute/help/New-AzGallery.md +++ b/src/Compute/Compute/help/New-AzGallery.md @@ -16,7 +16,7 @@ Create a gallery. New-AzGallery [-ResourceGroupName] [-Name] [-AsJob] [-Location] [-Description ] [-Tag ] [-Permission ] [-PublisherUri ] [-PublisherContact ] [-Eula ] [-PublicNamePrefix ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -146,6 +146,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicNamePrefix Gets or sets the prefix of the gallery name that will be displayed publicly. Visible to all users. diff --git a/src/Compute/Compute/help/New-AzGalleryApplication.md b/src/Compute/Compute/help/New-AzGalleryApplication.md index e6b8f87b0bcb..23affb7c8bcc 100644 --- a/src/Compute/Compute/help/New-AzGalleryApplication.md +++ b/src/Compute/Compute/help/New-AzGalleryApplication.md @@ -15,7 +15,7 @@ Create or update a gallery Application Definition. ``` New-AzGalleryApplication -GalleryName -Name -ResourceGroupName [-SubscriptionId ] -Location -SupportedOSType [-Description ] - [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -141,6 +141,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. diff --git a/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md index a46c5aa120b9..1a47912b5c49 100644 --- a/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/New-AzGalleryApplicationVersion.md @@ -18,7 +18,7 @@ New-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName ] [-PackageFileLink ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] [-TargetRegion ] [-Update ] [-PackageFileName ] [-ConfigFileName ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -236,6 +236,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 +``` + ### -PublishingProfileEndOfLifeDate The end of life date of the gallery image version. This property can be used for decommissioning purposes. diff --git a/src/Compute/Compute/help/New-AzGalleryImageDefinition.md b/src/Compute/Compute/help/New-AzGalleryImageDefinition.md index 306f396d0b0e..00f14f8a299a 100644 --- a/src/Compute/Compute/help/New-AzGalleryImageDefinition.md +++ b/src/Compute/Compute/help/New-AzGalleryImageDefinition.md @@ -21,7 +21,7 @@ New-AzGalleryImageDefinition [-ResourceGroupName] [-GalleryName] ] [-MaximumMemory ] [-MaximumVCPU ] [-PrivacyStatementUri ] [-PurchasePlanName ] [-PurchasePlanProduct ] [-PurchasePlanPublisher ] [-ReleaseNoteUri ] [-Tag ] [-Feature ] [-Architecture ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -509,6 +509,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -Publisher The name of the gallery Image Definition publisher. diff --git a/src/Compute/Compute/help/New-AzGalleryImageVersion.md b/src/Compute/Compute/help/New-AzGalleryImageVersion.md index 4ffd44782ede..8de41dd2e323 100644 --- a/src/Compute/Compute/help/New-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/New-AzGalleryImageVersion.md @@ -18,9 +18,10 @@ New-AzGalleryImageVersion [-ResourceGroupName] [-GalleryName] [-GalleryImageDefinitionName] [-Name] [-AsJob] -Location [-DataDiskImage ] [-OSDiskImage ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] - [-SourceImageId ] [-StorageAccountType ] [-SourceImageVMId ] [-Tag ] [-TargetRegion ] - [-TargetExtendedLocation ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-SourceImageId ] [-SourceImageVMId ] [-StorageAccountType ] [-Tag ] + [-TargetRegion ] [-TargetExtendedLocation ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -413,6 +414,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublishingProfileEndOfLifeDate The end of life date of the gallery Image Version. @@ -493,9 +509,9 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -StorageAccountType +### -SourceImageVMId -Specifies the storage account type to be used to store the image. This property is not updatable. Available values are Standard_LRS, Standard_ZRS and Premium_LRS. +The resource Id of the source virtual machine. Only required when capturing a virtual machine to source this Gallery Image Version. ```yaml Type: System.String @@ -509,9 +525,9 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -SourceImageVMId +### -StorageAccountType -The resource Id of the source virtual machine. Only required when capturing a virtual machine to source this Gallery Image Version. +Specifies the storage account type to be used to store the image. This property is not updatable. Available values are Standard_LRS, Standard_ZRS and Premium_LRS. ```yaml Type: System.String diff --git a/src/Compute/Compute/help/New-AzHost.md b/src/Compute/Compute/help/New-AzHost.md index c50065a645ee..9f0cb62ac131 100644 --- a/src/Compute/Compute/help/New-AzHost.md +++ b/src/Compute/Compute/help/New-AzHost.md @@ -16,7 +16,7 @@ Creates a host. New-AzHost [-ResourceGroupName] [-HostGroupName] [-Name] [-Location] -Sku [-PlatformFaultDomain ] [-AutoReplaceOnFailure ] [-LicenseType ] [-Tag ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -170,6 +170,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. diff --git a/src/Compute/Compute/help/New-AzHostGroup.md b/src/Compute/Compute/help/New-AzHostGroup.md index c2a9e7bfa802..df0b360ccef8 100644 --- a/src/Compute/Compute/help/New-AzHostGroup.md +++ b/src/Compute/Compute/help/New-AzHostGroup.md @@ -15,7 +15,7 @@ Creates a host group. ``` New-AzHostGroup [-ResourceGroupName] [-Name] [-Location] -PlatformFaultDomain [-Zone ] [-SupportAutomaticPlacement ] [-Tag ] - [-EnableUltraSSD] [-AsJob] [-DefaultProfile ] + [-EnableUltraSSD] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -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. diff --git a/src/Compute/Compute/help/New-AzImage.md b/src/Compute/Compute/help/New-AzImage.md index 88bc82e6c1bf..f3820ac911c7 100644 --- a/src/Compute/Compute/help/New-AzImage.md +++ b/src/Compute/Compute/help/New-AzImage.md @@ -14,7 +14,7 @@ Creates an image. ``` New-AzImage [-ResourceGroupName] [-ImageName] [-Image] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -104,6 +104,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/New-AzImageConfig.md b/src/Compute/Compute/help/New-AzImageConfig.md index 363113e07994..7613725b2537 100644 --- a/src/Compute/Compute/help/New-AzImageConfig.md +++ b/src/Compute/Compute/help/New-AzImageConfig.md @@ -16,7 +16,7 @@ Creates a configurable image object. New-AzImageConfig [[-Location] ] [-EdgeZone ] [[-Tag] ] [[-SourceVirtualMachineId] ] [[-OsDisk] ] [-HyperVGeneration ] [-DataDisk ] [-ZoneResilient] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -136,6 +136,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SourceVirtualMachineId Specifies the source virtual machine ID. diff --git a/src/Compute/Compute/help/New-AzProximityPlacementGroup.md b/src/Compute/Compute/help/New-AzProximityPlacementGroup.md index 9c9c953fb75d..bb3705f1b710 100644 --- a/src/Compute/Compute/help/New-AzProximityPlacementGroup.md +++ b/src/Compute/Compute/help/New-AzProximityPlacementGroup.md @@ -15,7 +15,7 @@ Create Proximity Placement Group resource. ``` New-AzProximityPlacementGroup [-ResourceGroupName] [-Name] [-Location] [-ProximityPlacementGroupType ] [-Tag ] [-AsJob] [-Zone ] - [-IntentVMSizeList ] [-DefaultProfile ] + [-IntentVMSizeList ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -141,6 +141,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProximityPlacementGroupType Specifies the type of the proximity placement group. Possible values are: Standard or Ultra diff --git a/src/Compute/Compute/help/New-AzRestorePoint.md b/src/Compute/Compute/help/New-AzRestorePoint.md index cee7d5d936ff..96f57ffcf098 100644 --- a/src/Compute/Compute/help/New-AzRestorePoint.md +++ b/src/Compute/Compute/help/New-AzRestorePoint.md @@ -15,7 +15,7 @@ This cmdlet can create a New Restore Point ``` New-AzRestorePoint [-ResourceGroupName] [-RestorePointCollectionName] [-Name] [[-Location] ] [-RestorePointId ] [-DisksToExclude ] [-ConsistencyMode ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -108,6 +108,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource group name this resource belongs to diff --git a/src/Compute/Compute/help/New-AzRestorePointCollection.md b/src/Compute/Compute/help/New-AzRestorePointCollection.md index ceaa83289770..cdad3940cc82 100644 --- a/src/Compute/Compute/help/New-AzRestorePointCollection.md +++ b/src/Compute/Compute/help/New-AzRestorePointCollection.md @@ -15,7 +15,7 @@ Creates a New Restore Point Collection ### DefaultParameter (Default) ``` New-AzRestorePointCollection [-ResourceGroupName] [-Name] [-VmId] - [-Location ] [-DefaultProfile ] [-WhatIf] + [-Location ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -23,7 +23,7 @@ New-AzRestorePointCollection [-ResourceGroupName] [-Name] [-Vm ``` New-AzRestorePointCollection [-ResourceGroupName] [-Name] [[-VmId] ] [-RestorePointCollectionId] -Location [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -97,6 +97,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource Group Name diff --git a/src/Compute/Compute/help/New-AzSnapshot.md b/src/Compute/Compute/help/New-AzSnapshot.md index 67a40b47d9c5..defd2a5d1af6 100644 --- a/src/Compute/Compute/help/New-AzSnapshot.md +++ b/src/Compute/Compute/help/New-AzSnapshot.md @@ -14,7 +14,7 @@ Creates a snapshot. ``` New-AzSnapshot [-ResourceGroupName] [-SnapshotName] [-Snapshot] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -71,6 +71,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/New-AzSnapshotConfig.md b/src/Compute/Compute/help/New-AzSnapshotConfig.md index 236f786608c5..e8dccbffe090 100644 --- a/src/Compute/Compute/help/New-AzSnapshotConfig.md +++ b/src/Compute/Compute/help/New-AzSnapshotConfig.md @@ -22,7 +22,7 @@ New-AzSnapshotConfig [[-SkuName] ] [[-OsType] ] [[ [-DiskEncryptionSetId ] [-EncryptionType ] [-DiskAccessId ] [-NetworkAccessPolicy ] [-PublicNetworkAccess ] [-AcceleratedNetwork ] [-DataAccessAuthMode ] [-Architecture ] [-ElasticSanResourceId ] - [-TierOption ] [-DefaultProfile ] + [-TierOption ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -372,6 +372,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicNetworkAccess Policy for controlling export on the disk. diff --git a/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md b/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md index df6983723eb7..cc97a392192e 100644 --- a/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md +++ b/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md @@ -19,7 +19,7 @@ New-AzSnapshotUpdateConfig [[-SkuName] ] [[-OsType] ] [-DiskEncryptionSetId ] [-EncryptionType ] [-PublicNetworkAccess ] [-DataAccessAuthMode ] [-Architecture ] [-NetworkAccessPolicy ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -236,6 +236,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicNetworkAccess Policy for controlling export on the disk. diff --git a/src/Compute/Compute/help/New-AzSshKey.md b/src/Compute/Compute/help/New-AzSshKey.md index b7897fec9f78..3f09a450c54a 100644 --- a/src/Compute/Compute/help/New-AzSshKey.md +++ b/src/Compute/Compute/help/New-AzSshKey.md @@ -14,7 +14,7 @@ Create a SSH Public Key resource. ``` New-AzSshKey -ResourceGroupName -Name [-PublicKey ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -69,6 +69,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 +``` + ### -PublicKey Public Key value. diff --git a/src/Compute/Compute/help/New-AzVM.md b/src/Compute/Compute/help/New-AzVM.md index c8607f44fe66..e139e30f2f1d 100644 --- a/src/Compute/Compute/help/New-AzVM.md +++ b/src/Compute/Compute/help/New-AzVM.md @@ -28,7 +28,7 @@ New-AzVM [[-ResourceGroupName] ] [[-Location] ] [-EdgeZone ] [-ImageReferenceId ] [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DiskControllerType ] [-SharedGalleryImageId ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -38,7 +38,7 @@ New-AzVM [-ResourceGroupName] [-Location] [-EdgeZone ] [[-Zone] ] [-DisableBginfoExtension] [-Tag ] [-LicenseType ] [-AsJob] [-OSDiskDeleteOption ] [-DataDiskDeleteOption ] [-SshKeyName ] [-GenerateSshKey] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DiskFileParameterSet @@ -54,7 +54,7 @@ New-AzVM [[-ResourceGroupName] ] [[-Location] ] [-EdgeZone ] [-EvictionPolicy ] [-MaxPrice ] [-EncryptionAtHost] [-HostGroupId ] [-CapacityReservationGroupId ] [-UserData ] [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -940,6 +940,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 +``` + ### -ProximityPlacementGroupId The resource id of the Proximity Placement Group to use with this virtual machine. diff --git a/src/Compute/Compute/help/New-AzVMConfig.md b/src/Compute/Compute/help/New-AzVMConfig.md index 745a6e2b7bbd..6d80b340ed96 100644 --- a/src/Compute/Compute/help/New-AzVMConfig.md +++ b/src/Compute/Compute/help/New-AzVMConfig.md @@ -22,7 +22,7 @@ New-AzVMConfig [-VMName] [-VMSize] [[-AvailabilitySetId] ] [-UserData ] [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-SharedGalleryImageId ] [-SecurityType ] [-EnableVtpm ] [-EnableSecureBoot ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ExplicitIdentityParameterSet @@ -34,7 +34,7 @@ New-AzVMConfig [-VMName] [-VMSize] [[-AvailabilitySetId] ] [-ImageReferenceId ] [-DiskControllerType ] [-UserData ] [-PlatformFaultDomain ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-SharedGalleryImageId ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -503,6 +503,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProximityPlacementGroupId The resource id of the Proximity Placement Group to use with this virtual machine. diff --git a/src/Compute/Compute/help/New-AzVMDataDisk.md b/src/Compute/Compute/help/New-AzVMDataDisk.md index 2acca6f76536..04dd14fd0810 100644 --- a/src/Compute/Compute/help/New-AzVMDataDisk.md +++ b/src/Compute/Compute/help/New-AzVMDataDisk.md @@ -16,7 +16,7 @@ Creates a local data disk object for a virtual machine or a Vmss VM. ``` New-AzVMDataDisk [-Lun] [-CreateOption] [-Name ] [-Caching ] [-DiskSizeInGB ] [-VhdUri ] [-SourceImageUri ] [-DiskEncryptionSetId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ManagedDiskParameterSetName @@ -24,7 +24,7 @@ New-AzVMDataDisk [-Lun] [-CreateOption] [-Name ] [-Cach New-AzVMDataDisk [-Lun] [-CreateOption] [-Name ] [-Caching ] [-DiskSizeInGB ] [-ManagedDiskId ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -179,6 +179,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SourceImageUri The virtual machine OS disk's source image Uri. diff --git a/src/Compute/Compute/help/New-AzVMSqlServerAutoBackupConfig.md b/src/Compute/Compute/help/New-AzVMSqlServerAutoBackupConfig.md index 70dec01bda5a..a7883beb135d 100644 --- a/src/Compute/Compute/help/New-AzVMSqlServerAutoBackupConfig.md +++ b/src/Compute/Compute/help/New-AzVMSqlServerAutoBackupConfig.md @@ -20,7 +20,7 @@ New-AzVMSqlServerAutoBackupConfig [-ResourceGroupName] [-Enable] [[-Ret [[-StorageKey] ] [-BackupSystemDbs] [-BackupScheduleType ] [-FullBackupFrequency ] [-FullBackupStartHour ] [-FullBackupWindowInHours ] [-LogBackupFrequencyInMinutes ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### StorageContextSqlServerAutoBackup @@ -30,7 +30,7 @@ New-AzVMSqlServerAutoBackupConfig [-ResourceGroupName] [-Enable] [[-Ret [[-StorageUri] ] [[-StorageKey] ] [-BackupSystemDbs] [-BackupScheduleType ] [-FullBackupFrequency ] [-FullBackupStartHour ] [-FullBackupWindowInHours ] [-LogBackupFrequencyInMinutes ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -244,6 +244,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/New-AzVMSqlServerAutoPatchingConfig.md b/src/Compute/Compute/help/New-AzVMSqlServerAutoPatchingConfig.md index 3afa19dea52e..36ff2eb4136a 100644 --- a/src/Compute/Compute/help/New-AzVMSqlServerAutoPatchingConfig.md +++ b/src/Compute/Compute/help/New-AzVMSqlServerAutoPatchingConfig.md @@ -15,7 +15,7 @@ Creates a configuration object for automatic patching on a virtual machine. ``` New-AzVMSqlServerAutoPatchingConfig [-Enable] [-DayOfWeek ] [-MaintenanceWindowStartingHour ] - [-MaintenanceWindowDuration ] [-PatchCategory ] + [-MaintenanceWindowDuration ] [-PatchCategory ] [-ProgressAction ] [] ``` @@ -136,6 +136,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 +``` + ### 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). diff --git a/src/Compute/Compute/help/New-AzVMSqlServerKeyVaultCredentialConfig.md b/src/Compute/Compute/help/New-AzVMSqlServerKeyVaultCredentialConfig.md index 227fab1971a6..023440f4b9ba 100644 --- a/src/Compute/Compute/help/New-AzVMSqlServerKeyVaultCredentialConfig.md +++ b/src/Compute/Compute/help/New-AzVMSqlServerKeyVaultCredentialConfig.md @@ -16,7 +16,7 @@ Creates a configuration object for SQL server key vault credential on a virtual ``` New-AzVMSqlServerKeyVaultCredentialConfig [-ResourceGroupName] [-Enable] [-CredentialName ] [-AzureKeyVaultUrl ] [-ServicePrincipalName ] [-ServicePrincipalSecret ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -82,6 +82,21 @@ Accept pipeline input: True (ByPropertyName) 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 ```yaml Type: System.String diff --git a/src/Compute/Compute/help/New-AzVmGalleryApplication.md b/src/Compute/Compute/help/New-AzVmGalleryApplication.md index 09b6e08beada..5464ef4dd405 100644 --- a/src/Compute/Compute/help/New-AzVmGalleryApplication.md +++ b/src/Compute/Compute/help/New-AzVmGalleryApplication.md @@ -14,7 +14,7 @@ Create a local PSVMGalleryApplication object. ``` New-AzVmGalleryApplication -PackageReferenceId [-ConfigReferenceId ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -79,6 +79,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 +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Compute/Compute/help/New-AzVmss.md b/src/Compute/Compute/help/New-AzVmss.md index 7b4afe6abb07..2c66f5a7e387 100644 --- a/src/Compute/Compute/help/New-AzVmss.md +++ b/src/Compute/Compute/help/New-AzVmss.md @@ -17,7 +17,7 @@ Creates a virtual machine scale set. ``` New-AzVmss [-ResourceGroupName] [-VMScaleSetName] [-VirtualMachineScaleSet] [-AsJob] [-EdgeZone ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -38,7 +38,7 @@ New-AzVmss [[-ResourceGroupName] ] [-VMScaleSetName] [-AsJob] [ [-OrchestrationMode ] [-CapacityReservationGroupId ] [-ImageReferenceId ] [-DiskControllerType ] [-SharedGalleryImageId ] [-SecurityType ] [-EnableVtpm ] [-EnableSecureBoot ] [-DefaultProfile ] - [-SinglePlacementGroup] [-WhatIf] [-Confirm] [] + [-SinglePlacementGroup] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -734,6 +734,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 +``` + ### -ProximityPlacementGroupId The resource id of the Proximity Placement Group to use with this scale set. diff --git a/src/Compute/Compute/help/New-AzVmssConfig.md b/src/Compute/Compute/help/New-AzVmssConfig.md index 4cb4f0dee2d0..697ce04a95b8 100644 --- a/src/Compute/Compute/help/New-AzVmssConfig.md +++ b/src/Compute/Compute/help/New-AzVmssConfig.md @@ -32,7 +32,7 @@ New-AzVmssConfig [[-Overprovision] ] [[-Location] ] [-EdgeZone [-BaseRegularPriorityCount ] [-RegularPriorityPercentage ] [-ImageReferenceId ] [-SharedGalleryImageId ] [-OSImageScheduledEventEnabled] [-OSImageScheduledEventNotBeforeTimeoutInMinutes ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -55,7 +55,7 @@ New-AzVmssConfig [[-Overprovision] ] [[-Location] ] [-EdgeZone [-AutomaticRepairAction ] [-BaseRegularPriorityCount ] [-RegularPriorityPercentage ] [-ImageReferenceId ] [-SharedGalleryImageId ] [-OSImageScheduledEventEnabled] [-OSImageScheduledEventNotBeforeTimeoutInMinutes ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -774,6 +774,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProximityPlacementGroupId The resource id of the Proximity Placement Group to use with this scale set. diff --git a/src/Compute/Compute/help/New-AzVmssGalleryApplication.md b/src/Compute/Compute/help/New-AzVmssGalleryApplication.md index cc9476cef8ea..0035679e80da 100644 --- a/src/Compute/Compute/help/New-AzVmssGalleryApplication.md +++ b/src/Compute/Compute/help/New-AzVmssGalleryApplication.md @@ -14,7 +14,7 @@ Create a local PSVMGalleryApplication object. ``` New-AzVmssGalleryApplication -PackageReferenceId [-ConfigReferenceId ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -79,6 +79,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 +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Compute/Compute/help/New-AzVmssIpConfig.md b/src/Compute/Compute/help/New-AzVmssIpConfig.md index 70b45decf52c..fd023f0ad1bd 100644 --- a/src/Compute/Compute/help/New-AzVmssIpConfig.md +++ b/src/Compute/Compute/help/New-AzVmssIpConfig.md @@ -20,7 +20,7 @@ New-AzVmssIpConfig [[-Name] ] [[-Id] ] [[-SubnetId] ] [-PublicIPAddressConfigurationName ] [-PublicIPAddressConfigurationIdleTimeoutInMinutes ] [-DnsSetting ] [-IpTag ] [-PublicIPPrefix ] [-PublicIPAddressVersion ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -208,6 +208,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicIPAddressConfigurationIdleTimeoutInMinutes The idle timeout of the public IP address. diff --git a/src/Compute/Compute/help/New-AzVmssIpTagConfig.md b/src/Compute/Compute/help/New-AzVmssIpTagConfig.md index af37c62f7a87..03d6b550fb58 100644 --- a/src/Compute/Compute/help/New-AzVmssIpTagConfig.md +++ b/src/Compute/Compute/help/New-AzVmssIpTagConfig.md @@ -14,7 +14,7 @@ Creates an IP Tag object for a network interface of a VMSS. ``` New-AzVmssIpTagConfig [-IpTagType] [-Tag ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -63,6 +63,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -Tag Specifies an IP Tag Value. diff --git a/src/Compute/Compute/help/New-AzVmssVaultCertificateConfig.md b/src/Compute/Compute/help/New-AzVmssVaultCertificateConfig.md index fb2b37338223..b8ceeb554ae6 100644 --- a/src/Compute/Compute/help/New-AzVmssVaultCertificateConfig.md +++ b/src/Compute/Compute/help/New-AzVmssVaultCertificateConfig.md @@ -15,7 +15,7 @@ Creates a Key Vault certificate configuration. ``` New-AzVmssVaultCertificateConfig [[-CertificateUrl] ] [[-CertificateStore] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -86,6 +86,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 +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Compute/Compute/help/Publish-AzVMDscConfiguration.md b/src/Compute/Compute/help/Publish-AzVMDscConfiguration.md index 66534d9758f1..893641b5e9df 100644 --- a/src/Compute/Compute/help/Publish-AzVMDscConfiguration.md +++ b/src/Compute/Compute/help/Publish-AzVMDscConfiguration.md @@ -18,7 +18,7 @@ Uploads a DSC script to Azure blob storage. Publish-AzVMDscConfiguration [-ResourceGroupName] [-ConfigurationPath] [[-ContainerName] ] [-StorageAccountName] [-StorageEndpointSuffix ] [-Force] [-SkipDependencyDetection] [-ConfigurationDataPath ] [-AdditionalPath ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -26,7 +26,7 @@ Publish-AzVMDscConfiguration [-ResourceGroupName] [-ConfigurationPath] ``` Publish-AzVMDscConfiguration [-ConfigurationPath] [[-OutputArchivePath] ] [-Force] [-SkipDependencyDetection] [-ConfigurationDataPath ] [-AdditionalPath ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -182,6 +182,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group that contains the storage account. diff --git a/src/Compute/Compute/help/Remove-AzAvailabilitySet.md b/src/Compute/Compute/help/Remove-AzAvailabilitySet.md index cdc7bd34f933..10a1dc460c33 100644 --- a/src/Compute/Compute/help/Remove-AzAvailabilitySet.md +++ b/src/Compute/Compute/help/Remove-AzAvailabilitySet.md @@ -15,7 +15,7 @@ Removes an availability set from Azure. ``` Remove-AzAvailabilitySet [-ResourceGroupName] [[-Name] ] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -93,6 +93,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzCapacityReservation.md b/src/Compute/Compute/help/Remove-AzCapacityReservation.md index d9af2ae4506a..c9e17ef3cede 100644 --- a/src/Compute/Compute/help/Remove-AzCapacityReservation.md +++ b/src/Compute/Compute/help/Remove-AzCapacityReservation.md @@ -14,7 +14,7 @@ Removes a Capacity Reservation resource ``` Remove-AzCapacityReservation -ResourceGroupName -ReservationGroupName [-Name ] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 +``` + ### -ReservationGroupName Specifies the name of the capacity reservation group. diff --git a/src/Compute/Compute/help/Remove-AzCapacityReservationGroup.md b/src/Compute/Compute/help/Remove-AzCapacityReservationGroup.md index 9dc937a2ed1d..3779ef7605e2 100644 --- a/src/Compute/Compute/help/Remove-AzCapacityReservationGroup.md +++ b/src/Compute/Compute/help/Remove-AzCapacityReservationGroup.md @@ -15,20 +15,20 @@ Removes a Capacity Reservation Group ### DefaultParameterSet (Default) ``` Remove-AzCapacityReservationGroup -ResourceGroupName -Name [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Remove-AzCapacityReservationGroup -ResourceId [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` Remove-AzCapacityReservationGroup -InputObject [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -106,6 +106,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzDisk.md b/src/Compute/Compute/help/Remove-AzDisk.md index ca5f6ba1ba43..01b51a61fcff 100644 --- a/src/Compute/Compute/help/Remove-AzDisk.md +++ b/src/Compute/Compute/help/Remove-AzDisk.md @@ -14,7 +14,7 @@ Removes a disk. ``` Remove-AzDisk [-ResourceGroupName] [-DiskName] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -92,6 +92,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzDiskAccess.md b/src/Compute/Compute/help/Remove-AzDiskAccess.md index 205586d1ac42..83154a4d0ab6 100644 --- a/src/Compute/Compute/help/Remove-AzDiskAccess.md +++ b/src/Compute/Compute/help/Remove-AzDiskAccess.md @@ -14,20 +14,20 @@ Removes a disk access resource. ### DefaultParameterSet (Default) ``` Remove-AzDiskAccess [-ResourceGroupName] [-Name] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Remove-AzDiskAccess [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` Remove-AzDiskAccess [-InputObject] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -127,6 +127,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzDiskEncryptionSet.md b/src/Compute/Compute/help/Remove-AzDiskEncryptionSet.md index fd873d875198..91c60447bcd4 100644 --- a/src/Compute/Compute/help/Remove-AzDiskEncryptionSet.md +++ b/src/Compute/Compute/help/Remove-AzDiskEncryptionSet.md @@ -15,20 +15,20 @@ Removes a disk encryption set. ### DefaultParameter (Default) ``` Remove-AzDiskEncryptionSet [-ResourceGroupName] [-Name] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Remove-AzDiskEncryptionSet [-Force] [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Remove-AzDiskEncryptionSet [-Force] [-InputObject] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -121,6 +121,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzGallery.md b/src/Compute/Compute/help/Remove-AzGallery.md index abc0fabed547..737318fc4c98 100644 --- a/src/Compute/Compute/help/Remove-AzGallery.md +++ b/src/Compute/Compute/help/Remove-AzGallery.md @@ -15,20 +15,20 @@ Delete a gallery. ### DefaultParameter (Default) ``` Remove-AzGallery [-ResourceGroupName] [-Name] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Remove-AzGallery [-Force] [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Remove-AzGallery [-Force] [-InputObject] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -120,6 +120,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Remove-AzGalleryApplication.md b/src/Compute/Compute/help/Remove-AzGalleryApplication.md index 060c0753f72a..957a942d71e2 100644 --- a/src/Compute/Compute/help/Remove-AzGalleryApplication.md +++ b/src/Compute/Compute/help/Remove-AzGalleryApplication.md @@ -16,13 +16,13 @@ Delete a gallery Application. ``` Remove-AzGalleryApplication -GalleryName -Name -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzGalleryApplication -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-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. diff --git a/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md index e78918d61303..bc007103d0b7 100644 --- a/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/Remove-AzGalleryApplicationVersion.md @@ -16,13 +16,13 @@ Delete a gallery Application Version. ``` Remove-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzGalleryApplicationVersion -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -161,6 +161,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. diff --git a/src/Compute/Compute/help/Remove-AzGalleryImageDefinition.md b/src/Compute/Compute/help/Remove-AzGalleryImageDefinition.md index e297ecc1fd36..813c7e4446d3 100644 --- a/src/Compute/Compute/help/Remove-AzGalleryImageDefinition.md +++ b/src/Compute/Compute/help/Remove-AzGalleryImageDefinition.md @@ -15,21 +15,21 @@ Delete a gallery image definition. ### DefaultParameter (Default) ``` Remove-AzGalleryImageDefinition [-ResourceGroupName] [-GalleryName] [-Name] [-Force] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Remove-AzGalleryImageDefinition [-Force] [-ResourceId] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Remove-AzGalleryImageDefinition [-Force] [-InputObject] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -137,6 +137,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md b/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md index f603666f6eaf..51e037c109cf 100644 --- a/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/Remove-AzGalleryImageVersion.md @@ -16,21 +16,21 @@ Delete a gallery image version. ``` Remove-AzGalleryImageVersion [-ResourceGroupName] [-GalleryName] [-GalleryImageDefinitionName] [-Name] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Remove-AzGalleryImageVersion [-Force] [-ResourceId] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Remove-AzGalleryImageVersion [-Force] [-InputObject] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -153,6 +153,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Remove-AzHost.md b/src/Compute/Compute/help/Remove-AzHost.md index 33a3e08a0840..565471d0db3d 100644 --- a/src/Compute/Compute/help/Remove-AzHost.md +++ b/src/Compute/Compute/help/Remove-AzHost.md @@ -15,20 +15,20 @@ Removes a host. ### DefaultParameter (Default) ``` Remove-AzHost [-ResourceGroupName] [-HostGroupName] [-Name] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Remove-AzHost [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Remove-AzHost [-InputObject] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -127,6 +127,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Remove-AzHostGroup.md b/src/Compute/Compute/help/Remove-AzHostGroup.md index a11a739628c4..185598968a29 100644 --- a/src/Compute/Compute/help/Remove-AzHostGroup.md +++ b/src/Compute/Compute/help/Remove-AzHostGroup.md @@ -15,20 +15,20 @@ Removes a host group. ### DefaultParameter (Default) ``` Remove-AzHostGroup [-ResourceGroupName] [-Name] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Remove-AzHostGroup [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Remove-AzHostGroup [-InputObject] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -112,6 +112,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Remove-AzImage.md b/src/Compute/Compute/help/Remove-AzImage.md index 46465907480f..aa96b6dc7a19 100644 --- a/src/Compute/Compute/help/Remove-AzImage.md +++ b/src/Compute/Compute/help/Remove-AzImage.md @@ -14,7 +14,7 @@ Removes an image. ``` Remove-AzImage [-ResourceGroupName] [-ImageName] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -92,6 +92,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzImageDataDisk.md b/src/Compute/Compute/help/Remove-AzImageDataDisk.md index e7853c783c21..6a383f1aaa26 100644 --- a/src/Compute/Compute/help/Remove-AzImageDataDisk.md +++ b/src/Compute/Compute/help/Remove-AzImageDataDisk.md @@ -14,7 +14,7 @@ Removes a data disk from an image object. ``` Remove-AzImageDataDisk [-Image] [-Lun] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -76,6 +76,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md b/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md index 9ae95ca36f9a..e2f9b3f48d26 100644 --- a/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md +++ b/src/Compute/Compute/help/Remove-AzProximityPlacementGroup.md @@ -15,21 +15,21 @@ Delete Proximity Placement Group resource. ### DefaultParameter (Default) ``` Remove-AzProximityPlacementGroup [-ResourceGroupName] [-Name] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Remove-AzProximityPlacementGroup [-Force] [-ResourceId] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Remove-AzProximityPlacementGroup [-Force] [-InputObject] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -133,6 +133,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Remove-AzRestorePoint.md b/src/Compute/Compute/help/Remove-AzRestorePoint.md index eac3a7993abb..67f37bfb0a28 100644 --- a/src/Compute/Compute/help/Remove-AzRestorePoint.md +++ b/src/Compute/Compute/help/Remove-AzRestorePoint.md @@ -14,7 +14,7 @@ This cmdlet can remove a Restore Point ``` Remove-AzRestorePoint [-ResourceGroupName] [-RestorePointCollectionName] [-Name] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -62,6 +62,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource Group Name diff --git a/src/Compute/Compute/help/Remove-AzRestorePointCollection.md b/src/Compute/Compute/help/Remove-AzRestorePointCollection.md index 36124c4d3d53..1a65f5613c60 100644 --- a/src/Compute/Compute/help/Remove-AzRestorePointCollection.md +++ b/src/Compute/Compute/help/Remove-AzRestorePointCollection.md @@ -14,7 +14,7 @@ This Cmdlet can remove Restore Point Collection ``` Remove-AzRestorePointCollection [-ResourceGroupName] [-Name] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -62,6 +62,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource Group Name diff --git a/src/Compute/Compute/help/Remove-AzSnapshot.md b/src/Compute/Compute/help/Remove-AzSnapshot.md index 45851d0a419a..c10acfd04bf1 100644 --- a/src/Compute/Compute/help/Remove-AzSnapshot.md +++ b/src/Compute/Compute/help/Remove-AzSnapshot.md @@ -14,7 +14,7 @@ Removes a snapshot. ``` Remove-AzSnapshot [-ResourceGroupName] [-SnapshotName] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzSshKey.md b/src/Compute/Compute/help/Remove-AzSshKey.md index bc79a743e145..fe8223156e9b 100644 --- a/src/Compute/Compute/help/Remove-AzSshKey.md +++ b/src/Compute/Compute/help/Remove-AzSshKey.md @@ -15,19 +15,19 @@ Delete a SSH Public Key resource. ### DefaultParameterSet (Default) ``` Remove-AzSshKey -ResourceGroupName -Name [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Remove-AzSshKey -ResourceId [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` Remove-AzSshKey -InputObject [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -89,6 +89,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzVM.md b/src/Compute/Compute/help/Remove-AzVM.md index 2159036ebbce..3e6caa55fdba 100644 --- a/src/Compute/Compute/help/Remove-AzVM.md +++ b/src/Compute/Compute/help/Remove-AzVM.md @@ -16,14 +16,14 @@ Removes a virtual machine from Azure. ### ResourceGroupNameParameterSetName (Default) ``` Remove-AzVM [-Name] [-ForceDeletion ] [-Force] [-NoWait] [-ResourceGroupName] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IdParameterSetName ``` Remove-AzVM [-ForceDeletion ] [-Force] [-NoWait] [-Id] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -161,6 +161,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Remove-AzVMAEMExtension.md b/src/Compute/Compute/help/Remove-AzVMAEMExtension.md index 04ee643ef701..cef107381128 100644 --- a/src/Compute/Compute/help/Remove-AzVMAEMExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMAEMExtension.md @@ -15,7 +15,7 @@ Removes the AEM extension from a virtual machine. ``` Remove-AzVMAEMExtension [-ResourceGroupName] [-VMName] [[-Name] ] - [[-OSType] ] [-NoWait] [-DefaultProfile ] + [[-OSType] ] [-NoWait] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -95,6 +95,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 Specifies the name of the resource group of a virtual machine. This cmdlet removes the AEM extension from that virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMAccessExtension.md b/src/Compute/Compute/help/Remove-AzVMAccessExtension.md index 63913f35d246..1410acc02d0e 100644 --- a/src/Compute/Compute/help/Remove-AzVMAccessExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMAccessExtension.md @@ -15,7 +15,7 @@ Removes the VMAccess extension from a virtual machine. ``` Remove-AzVMAccessExtension [-ResourceGroupName] [-VMName] [-Name] [-Force] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -97,6 +97,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMBackup.md b/src/Compute/Compute/help/Remove-AzVMBackup.md index 712a74b8c8cb..12fe547793c6 100644 --- a/src/Compute/Compute/help/Remove-AzVMBackup.md +++ b/src/Compute/Compute/help/Remove-AzVMBackup.md @@ -15,7 +15,7 @@ Removes the backup from a virtual machine. ``` Remove-AzVMBackup [-ResourceGroupName] [-VMName] [-Tag] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -45,6 +45,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 ```yaml Type: System.String diff --git a/src/Compute/Compute/help/Remove-AzVMChefExtension.md b/src/Compute/Compute/help/Remove-AzVMChefExtension.md index 5e9686bb3541..236974d06e19 100644 --- a/src/Compute/Compute/help/Remove-AzVMChefExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMChefExtension.md @@ -16,14 +16,14 @@ Removes the Chef extension from a virtual machine. ### Linux ``` Remove-AzVMChefExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Linux] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Windows ``` Remove-AzVMChefExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Windows] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -108,6 +108,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 Specifies the name of the resource group that contains the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md b/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md index 7dfea3c4c266..dbca89ec4461 100644 --- a/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMCustomScriptExtension.md @@ -15,7 +15,7 @@ Removes a custom script extension from a virtual machine. ``` Remove-AzVMCustomScriptExtension [-ResourceGroupName] [-VMName] [-Name] [-Force] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -97,6 +97,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMDataDisk.md b/src/Compute/Compute/help/Remove-AzVMDataDisk.md index 1800e98c0ad0..3ea422deeca9 100644 --- a/src/Compute/Compute/help/Remove-AzVMDataDisk.md +++ b/src/Compute/Compute/help/Remove-AzVMDataDisk.md @@ -15,7 +15,7 @@ Removes a data disk from a virtual machine. ``` Remove-AzVMDataDisk [-VM] [[-DataDiskNames] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -68,6 +68,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 +``` + ### -VM Specifies the local virtual machine object from which to remove a data disk. To obtain a virtual machine object, use the Get-AzVM cmdlet. diff --git a/src/Compute/Compute/help/Remove-AzVMDiagnosticsExtension.md b/src/Compute/Compute/help/Remove-AzVMDiagnosticsExtension.md index f6a12834de67..ba87bd527739 100644 --- a/src/Compute/Compute/help/Remove-AzVMDiagnosticsExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMDiagnosticsExtension.md @@ -15,7 +15,7 @@ Removes the Diagnostics extension from a virtual machine. ``` Remove-AzVMDiagnosticsExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-NoWait] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -80,6 +80,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMDiskEncryptionExtension.md b/src/Compute/Compute/help/Remove-AzVMDiskEncryptionExtension.md index 9706313462ec..78343a33b797 100644 --- a/src/Compute/Compute/help/Remove-AzVMDiskEncryptionExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMDiskEncryptionExtension.md @@ -15,7 +15,7 @@ Removes the disk encryption extension from a virtual machine. ``` Remove-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-Force] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -104,6 +104,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 Specifies the name of the resource group for the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMDscExtension.md b/src/Compute/Compute/help/Remove-AzVMDscExtension.md index 7f067eb6dab2..fed8206c9fa1 100644 --- a/src/Compute/Compute/help/Remove-AzVMDscExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMDscExtension.md @@ -15,7 +15,7 @@ Removes a DSC extension handler from a virtual machine in a resource group. ``` Remove-AzVMDscExtension [-ResourceGroupName] [-VMName] [[-Name] ] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -79,6 +79,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMExtension.md b/src/Compute/Compute/help/Remove-AzVMExtension.md index 5fd113a7474e..44dc48cb0c8b 100644 --- a/src/Compute/Compute/help/Remove-AzVMExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMExtension.md @@ -15,7 +15,7 @@ Removes an extension from a virtual machine. ``` Remove-AzVMExtension [-ResourceGroupName] [-VMName] [-Name] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -93,6 +93,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVMNetworkInterface.md b/src/Compute/Compute/help/Remove-AzVMNetworkInterface.md index 2aa515cff2fb..5529fcff5db1 100644 --- a/src/Compute/Compute/help/Remove-AzVMNetworkInterface.md +++ b/src/Compute/Compute/help/Remove-AzVMNetworkInterface.md @@ -15,7 +15,7 @@ Removes a network interface from a virtual machine. ``` Remove-AzVMNetworkInterface [-VM] [[-NetworkInterfaceIDs] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -68,6 +68,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 +``` + ### -VM Specifies the virtual machine from which this cmdlet removes a network interface. To obtain a virtual machine object, use the Get-AzVM cmdlet. diff --git a/src/Compute/Compute/help/Remove-AzVMRunCommand.md b/src/Compute/Compute/help/Remove-AzVMRunCommand.md index e36cb1a27f52..7bbf54d51586 100644 --- a/src/Compute/Compute/help/Remove-AzVMRunCommand.md +++ b/src/Compute/Compute/help/Remove-AzVMRunCommand.md @@ -16,13 +16,13 @@ The operation to delete the run command. ``` Remove-AzVMRunCommand -ResourceGroupName -RunCommandName [-SubscriptionId ] -VMName [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -116,6 +116,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. diff --git a/src/Compute/Compute/help/Remove-AzVMSecret.md b/src/Compute/Compute/help/Remove-AzVMSecret.md index 97c89c97e637..00542efaf82e 100644 --- a/src/Compute/Compute/help/Remove-AzVMSecret.md +++ b/src/Compute/Compute/help/Remove-AzVMSecret.md @@ -14,7 +14,7 @@ Removes (a) secret(s) from a virtual machine object ``` Remove-AzVMSecret [-VM] [[-SourceVaultId] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -47,6 +47,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 +``` + ### -SourceVaultId Specifies an array of source vault IDs that this cmdlet removes. diff --git a/src/Compute/Compute/help/Remove-AzVMSqlServerExtension.md b/src/Compute/Compute/help/Remove-AzVMSqlServerExtension.md index 2f2faef25f64..954e3a4f6b55 100644 --- a/src/Compute/Compute/help/Remove-AzVMSqlServerExtension.md +++ b/src/Compute/Compute/help/Remove-AzVMSqlServerExtension.md @@ -15,7 +15,7 @@ Removes a SQL Server extension from a virtual machine. ``` Remove-AzVMSqlServerExtension [-ResourceGroupName] [-VMName] [-Name] [-NoWait] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -77,6 +77,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md b/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md index 9ce8ff12d060..ea6c25b240d6 100644 --- a/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md +++ b/src/Compute/Compute/help/Remove-AzVmGalleryApplication.md @@ -14,7 +14,7 @@ Remove a VMGalleryApplication object from the PSVirtualMachine object. ``` Remove-AzVmGalleryApplication -VM -GalleryApplicationsReferenceId - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -63,6 +63,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 +``` + ### -VM The PSVirtualMachine object to delete a Gallery Application Reference ID from. diff --git a/src/Compute/Compute/help/Remove-AzVmss.md b/src/Compute/Compute/help/Remove-AzVmss.md index 92dcebb8c319..df082ddc8af5 100644 --- a/src/Compute/Compute/help/Remove-AzVmss.md +++ b/src/Compute/Compute/help/Remove-AzVmss.md @@ -16,7 +16,7 @@ Removes the VMSS or a virtual machine that is within the VMSS. ``` Remove-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-ForceDeletion ] [-Force] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -118,6 +118,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group that the VMSS belongs to. diff --git a/src/Compute/Compute/help/Remove-AzVmssDataDisk.md b/src/Compute/Compute/help/Remove-AzVmssDataDisk.md index 8347066c4dc2..c4067fd999ce 100644 --- a/src/Compute/Compute/help/Remove-AzVmssDataDisk.md +++ b/src/Compute/Compute/help/Remove-AzVmssDataDisk.md @@ -15,14 +15,14 @@ Removes a data disk from the VMSS. ### NameParameterSet ``` Remove-AzVmssDataDisk [-VirtualMachineScaleSet] [-Name] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### LunParameterSet ``` Remove-AzVmssDataDisk [-VirtualMachineScaleSet] [-Lun] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -92,6 +92,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet Specify the VMSS object. diff --git a/src/Compute/Compute/help/Remove-AzVmssDiagnosticsExtension.md b/src/Compute/Compute/help/Remove-AzVmssDiagnosticsExtension.md index 79f53bb5d9d2..bb949a36b562 100644 --- a/src/Compute/Compute/help/Remove-AzVmssDiagnosticsExtension.md +++ b/src/Compute/Compute/help/Remove-AzVmssDiagnosticsExtension.md @@ -15,7 +15,7 @@ Removes a diagnostics extension from the VMSS. ``` Remove-AzVmssDiagnosticsExtension [-VirtualMachineScaleSet] [[-Name] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -63,6 +63,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet Specifies the VMSS from which to remove the extension. diff --git a/src/Compute/Compute/help/Remove-AzVmssExtension.md b/src/Compute/Compute/help/Remove-AzVmssExtension.md index 51a8a862350c..5b12e29b33c7 100644 --- a/src/Compute/Compute/help/Remove-AzVmssExtension.md +++ b/src/Compute/Compute/help/Remove-AzVmssExtension.md @@ -16,14 +16,14 @@ Removes an extension from the VMSS. ### NameParameterSet ``` Remove-AzVmssExtension [-VirtualMachineScaleSet] [-Name] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IdParameterSet ``` Remove-AzVmssExtension [-VirtualMachineScaleSet] [-Id] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -96,6 +96,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet Specifies the VMSS from which to remove the extension from. diff --git a/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md b/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md index a644bb741849..469d01f106ec 100644 --- a/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md +++ b/src/Compute/Compute/help/Remove-AzVmssGalleryApplication.md @@ -15,7 +15,7 @@ Remove a VMGalleryApplication object from the PSVirtualMachineScaleSetVMProfile ``` Remove-AzVmssGalleryApplication -VirtualMachineScaleSetVM -GalleryApplicationsReferenceId [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -63,6 +63,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 +``` + ### -VirtualMachineScaleSetVM The PSVirtualMachineScaleSetVMProfile object to delete a Gallery Application Reference ID from. diff --git a/src/Compute/Compute/help/Remove-AzVmssNetworkInterfaceConfiguration.md b/src/Compute/Compute/help/Remove-AzVmssNetworkInterfaceConfiguration.md index 7e96eac2ab3e..cd17f5e5b879 100644 --- a/src/Compute/Compute/help/Remove-AzVmssNetworkInterfaceConfiguration.md +++ b/src/Compute/Compute/help/Remove-AzVmssNetworkInterfaceConfiguration.md @@ -16,14 +16,14 @@ Removes a network interface configuration from a VMSS. ### NameParameterSet ``` Remove-AzVmssNetworkInterfaceConfiguration [-VirtualMachineScaleSet] - [-Name] [-DefaultProfile ] [-WhatIf] + [-Name] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IdParameterSet ``` Remove-AzVmssNetworkInterfaceConfiguration [-VirtualMachineScaleSet] [-Id] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -88,6 +88,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet Specifies the VMSS object. diff --git a/src/Compute/Compute/help/Remove-AzVmssRunCommand.md b/src/Compute/Compute/help/Remove-AzVmssRunCommand.md index feeecf0d6591..84bfee7316ae 100644 --- a/src/Compute/Compute/help/Remove-AzVmssRunCommand.md +++ b/src/Compute/Compute/help/Remove-AzVmssRunCommand.md @@ -14,7 +14,7 @@ Remove VMSS RunCommand ``` Remove-AzVmssRunCommand [-ResourceGroupName] [-VMScaleSetName] -RunCommandName - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -62,6 +62,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 Resource Group Name diff --git a/src/Compute/Compute/help/Remove-AzVmssVMDataDisk.md b/src/Compute/Compute/help/Remove-AzVmssVMDataDisk.md index a53811fa4037..df8dee3b49ff 100644 --- a/src/Compute/Compute/help/Remove-AzVmssVMDataDisk.md +++ b/src/Compute/Compute/help/Remove-AzVmssVMDataDisk.md @@ -14,7 +14,7 @@ Removes a data disk from a virtual machine scale set VM ``` Remove-AzVmssVMDataDisk [-VirtualMachineScaleSetVM] [-Lun] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -65,6 +65,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 +``` + ### -VirtualMachineScaleSetVM The virtual machine scale set VM profile. diff --git a/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md index e0ffdedc5d47..a8c7b629fe17 100644 --- a/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md +++ b/src/Compute/Compute/help/Remove-AzVmssVMRunCommand.md @@ -16,13 +16,13 @@ The operation to delete the VMSS VM run command. ``` Remove-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName [-SubscriptionId ] -VMScaleSetName [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzVmssVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -131,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. diff --git a/src/Compute/Compute/help/Repair-AzVmssServiceFabricUpdateDomain.md b/src/Compute/Compute/help/Repair-AzVmssServiceFabricUpdateDomain.md index 490204da8b32..5cbbcffdbe83 100644 --- a/src/Compute/Compute/help/Repair-AzVmssServiceFabricUpdateDomain.md +++ b/src/Compute/Compute/help/Repair-AzVmssServiceFabricUpdateDomain.md @@ -16,7 +16,7 @@ Manual platform update domain walk to update virtual machines in a service fabri ``` Repair-AzVmssServiceFabricUpdateDomain [-ResourceGroupName] [-VMScaleSetName] [-PlatformUpdateDomain] [-Zone ] [-PlacementGroupId ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,14 +24,14 @@ Repair-AzVmssServiceFabricUpdateDomain [-ResourceGroupName] [-VMScaleSe ``` Repair-AzVmssServiceFabricUpdateDomain [-PlatformUpdateDomain] [-Zone ] [-PlacementGroupId ] [-ResourceId] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Repair-AzVmssServiceFabricUpdateDomain [-PlatformUpdateDomain] [-Zone ] [-PlacementGroupId ] [-VirtualMachineScaleSet] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -124,6 +124,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. diff --git a/src/Compute/Compute/help/Restart-AzHost.md b/src/Compute/Compute/help/Restart-AzHost.md index 7897743c328e..c59ff0f6e751 100644 --- a/src/Compute/Compute/help/Restart-AzHost.md +++ b/src/Compute/Compute/help/Restart-AzHost.md @@ -15,20 +15,20 @@ Restart the dedicated host. ### DefaultParameterSet (Default) ``` Restart-AzHost [-ResourceGroupName] [-HostGroupName] [-Name] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameterSet ``` Restart-AzHost -ResourceId [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameterSet ``` Restart-AzHost -InputObject [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -121,6 +121,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Restart-AzVM.md b/src/Compute/Compute/help/Restart-AzVM.md index 8f8fdf6097f6..4a88d4381b4f 100644 --- a/src/Compute/Compute/help/Restart-AzVM.md +++ b/src/Compute/Compute/help/Restart-AzVM.md @@ -16,27 +16,27 @@ Restarts an Azure virtual machine. ### RestartResourceGroupNameParameterSetName (Default) ``` Restart-AzVM [-ResourceGroupName] [-Name] [-AsJob] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PerformMaintenanceResourceGroupNameParameterSetName ``` Restart-AzVM [-ResourceGroupName] [-Name] [-PerformMaintenance] [-AsJob] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RestartIdParameterSetName ``` Restart-AzVM [-Id] [-AsJob] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PerformMaintenanceIdParameterSetName ``` Restart-AzVM [-Id] [-PerformMaintenance] [-AsJob] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -143,6 +143,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Restart-AzVmss.md b/src/Compute/Compute/help/Restart-AzVmss.md index 56be86deaa31..5980eabd85f4 100644 --- a/src/Compute/Compute/help/Restart-AzVmss.md +++ b/src/Compute/Compute/help/Restart-AzVmss.md @@ -15,7 +15,7 @@ Restarts the VMSS or a virtual machine within the VMSS. ``` Restart-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -86,6 +86,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the VMSS. diff --git a/src/Compute/Compute/help/Revoke-AzDiskAccess.md b/src/Compute/Compute/help/Revoke-AzDiskAccess.md index ed0bb184e32c..89a45634d22a 100644 --- a/src/Compute/Compute/help/Revoke-AzDiskAccess.md +++ b/src/Compute/Compute/help/Revoke-AzDiskAccess.md @@ -14,7 +14,7 @@ Revokes an access to a disk. ``` Revoke-AzDiskAccess [-ResourceGroupName] [-DiskName] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Revoke-AzSnapshotAccess.md b/src/Compute/Compute/help/Revoke-AzSnapshotAccess.md index db45d4f50354..664ca5885100 100644 --- a/src/Compute/Compute/help/Revoke-AzSnapshotAccess.md +++ b/src/Compute/Compute/help/Revoke-AzSnapshotAccess.md @@ -14,7 +14,7 @@ Revokes an access to a snapshot. ``` Revoke-AzSnapshotAccess [-ResourceGroupName] [-SnapshotName] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -62,6 +62,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Save-AzVMImage.md b/src/Compute/Compute/help/Save-AzVMImage.md index 4be1762dad29..65942fa0635c 100644 --- a/src/Compute/Compute/help/Save-AzVMImage.md +++ b/src/Compute/Compute/help/Save-AzVMImage.md @@ -17,13 +17,13 @@ Saves a virtual machine as a VMImage. ``` Save-AzVMImage [-Name] [-DestinationContainerName] [-VHDNamePrefix] [-Overwrite] [[-Path] ] [-ResourceGroupName] [-AsJob] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### IdParameterSetName ``` Save-AzVMImage [-DestinationContainerName] [-VHDNamePrefix] [-Overwrite] [[-Path] ] - [-Id] [-AsJob] [-DefaultProfile ] + [-Id] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -168,6 +168,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Save-AzVhd.md b/src/Compute/Compute/help/Save-AzVhd.md index 3f5d1e02649e..e6aa825ff09a 100644 --- a/src/Compute/Compute/help/Save-AzVhd.md +++ b/src/Compute/Compute/help/Save-AzVhd.md @@ -17,13 +17,13 @@ Saves downloaded .vhd images locally. ``` Save-AzVhd [-ResourceGroupName] [-SourceUri] [-LocalFilePath] [[-NumberOfThreads] ] [-OverWrite] [-AsJob] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### StorageKeyParameterSetName ``` Save-AzVhd [-StorageKey] [-SourceUri] [-LocalFilePath] [[-NumberOfThreads] ] - [-OverWrite] [-AsJob] [-DefaultProfile ] + [-OverWrite] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -144,6 +144,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 Specifies the name of the resource group of the storage account. diff --git a/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md b/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md index 70af5a60e32f..b4b77bdf96b3 100644 --- a/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md @@ -14,7 +14,7 @@ Sets the disk encryption key properties on a disk object. ``` Set-AzDiskDiskEncryptionKey [-Disk] [[-SecretUrl] ] [[-SourceVaultId] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -72,6 +72,21 @@ Accept pipeline input: True (ByPropertyName, 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 +``` + ### -SecretUrl Specifies the secret Url. diff --git a/src/Compute/Compute/help/Set-AzDiskImageReference.md b/src/Compute/Compute/help/Set-AzDiskImageReference.md index 0f49c6f9ad79..06f4c0b8e008 100644 --- a/src/Compute/Compute/help/Set-AzDiskImageReference.md +++ b/src/Compute/Compute/help/Set-AzDiskImageReference.md @@ -14,7 +14,7 @@ Sets the image reference properties on a disk object. ``` Set-AzDiskImageReference [-Disk] [[-Id] ] [[-Lun] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -97,6 +97,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md b/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md index 8448f3d6c771..4de9a39218b0 100644 --- a/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md @@ -14,7 +14,7 @@ Sets the key encryption key properties on a disk object. ``` Set-AzDiskKeyEncryptionKey [-Disk] [[-KeyUrl] ] [[-SourceVaultId] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -87,6 +87,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SourceVaultId Specifies the source vault ID. diff --git a/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md b/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md index 1e230d1a2b13..4c9f3adb60c2 100644 --- a/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md +++ b/src/Compute/Compute/help/Set-AzDiskSecurityProfile.md @@ -14,7 +14,7 @@ Set SecurityProfile on managed disk ``` Set-AzDiskSecurityProfile [-Disk] -SecurityType [-SecureVMDiskEncryptionSet ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -125,6 +125,21 @@ Accept pipeline input: True (ByPropertyName, 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 +``` + ### -SecureVMDiskEncryptionSet ResourceId of the disk encryption set to use for enabling encryption at rest. diff --git a/src/Compute/Compute/help/Set-AzDiskUpdateDiskEncryptionKey.md b/src/Compute/Compute/help/Set-AzDiskUpdateDiskEncryptionKey.md index 4ee841c278ee..000a2fca473e 100644 --- a/src/Compute/Compute/help/Set-AzDiskUpdateDiskEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzDiskUpdateDiskEncryptionKey.md @@ -14,7 +14,7 @@ Sets the disk encryption key properties on a disk update object. ``` Set-AzDiskUpdateDiskEncryptionKey [-DiskUpdate] [[-SecretUrl] ] - [[-SourceVaultId] ] [-DefaultProfile ] + [[-SourceVaultId] ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -71,6 +71,21 @@ Accept pipeline input: True (ByPropertyName, 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 +``` + ### -SecretUrl Specifies the secret Url. diff --git a/src/Compute/Compute/help/Set-AzDiskUpdateKeyEncryptionKey.md b/src/Compute/Compute/help/Set-AzDiskUpdateKeyEncryptionKey.md index f7931635eede..1e6c2b393970 100644 --- a/src/Compute/Compute/help/Set-AzDiskUpdateKeyEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzDiskUpdateKeyEncryptionKey.md @@ -14,7 +14,7 @@ Sets the key encryption key properties on a disk update object. ``` Set-AzDiskUpdateKeyEncryptionKey [-DiskUpdate] [[-KeyUrl] ] [[-SourceVaultId] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -86,6 +86,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SourceVaultId Specifies the source vault ID. diff --git a/src/Compute/Compute/help/Set-AzImageOsDisk.md b/src/Compute/Compute/help/Set-AzImageOsDisk.md index 751674694a58..64b9b344893b 100644 --- a/src/Compute/Compute/help/Set-AzImageOsDisk.md +++ b/src/Compute/Compute/help/Set-AzImageOsDisk.md @@ -17,7 +17,7 @@ Set-AzImageOsDisk [-Image] [[-OsType] ] [[-OsState] ] [[-BlobUri] ] [-Caching ] [-DiskSizeGB ] [-StorageAccountType ] [-SnapshotId ] [-ManagedDiskId ] [-DiskEncryptionSetId ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -184,6 +184,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SnapshotId Specifies the ID of a snapshot. diff --git a/src/Compute/Compute/help/Set-AzSnapshotDiskEncryptionKey.md b/src/Compute/Compute/help/Set-AzSnapshotDiskEncryptionKey.md index 24b49dc1637d..50012796c048 100644 --- a/src/Compute/Compute/help/Set-AzSnapshotDiskEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzSnapshotDiskEncryptionKey.md @@ -14,7 +14,7 @@ Sets the disk encryption key properties on a snapshot object. ``` Set-AzSnapshotDiskEncryptionKey [-Snapshot] [[-SecretUrl] ] [[-SourceVaultId] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -56,6 +56,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 +``` + ### -SecretUrl Specifies the secret Url. diff --git a/src/Compute/Compute/help/Set-AzSnapshotImageReference.md b/src/Compute/Compute/help/Set-AzSnapshotImageReference.md index ed3e94a611de..5022630bb9aa 100644 --- a/src/Compute/Compute/help/Set-AzSnapshotImageReference.md +++ b/src/Compute/Compute/help/Set-AzSnapshotImageReference.md @@ -14,7 +14,7 @@ Sets the image reference properties on a snapshot object. ``` Set-AzSnapshotImageReference [-Snapshot] [[-Id] ] [[-Lun] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -82,6 +82,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -Snapshot Specifies a local snapshot object. diff --git a/src/Compute/Compute/help/Set-AzSnapshotKeyEncryptionKey.md b/src/Compute/Compute/help/Set-AzSnapshotKeyEncryptionKey.md index e76c2046de93..560f9f7e70cb 100644 --- a/src/Compute/Compute/help/Set-AzSnapshotKeyEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzSnapshotKeyEncryptionKey.md @@ -14,7 +14,7 @@ Sets the key encryption key properties on a snapshot object. ``` Set-AzSnapshotKeyEncryptionKey [-Snapshot] [[-KeyUrl] ] [[-SourceVaultId] ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -71,6 +71,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -Snapshot Specifies a local snapshot object. diff --git a/src/Compute/Compute/help/Set-AzSnapshotUpdateDiskEncryptionKey.md b/src/Compute/Compute/help/Set-AzSnapshotUpdateDiskEncryptionKey.md index 06671a389055..6e538b94c8e8 100644 --- a/src/Compute/Compute/help/Set-AzSnapshotUpdateDiskEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzSnapshotUpdateDiskEncryptionKey.md @@ -14,7 +14,7 @@ Sets the disk encryption key properties on a snapshot update object. ``` Set-AzSnapshotUpdateDiskEncryptionKey [-SnapshotUpdate] [[-SecretUrl] ] - [[-SourceVaultId] ] [-DefaultProfile ] + [[-SourceVaultId] ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -56,6 +56,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 +``` + ### -SecretUrl Specifies the secret Url. diff --git a/src/Compute/Compute/help/Set-AzSnapshotUpdateKeyEncryptionKey.md b/src/Compute/Compute/help/Set-AzSnapshotUpdateKeyEncryptionKey.md index d0bea6682942..bfb6f3f056fd 100644 --- a/src/Compute/Compute/help/Set-AzSnapshotUpdateKeyEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzSnapshotUpdateKeyEncryptionKey.md @@ -14,7 +14,7 @@ Sets the key encryption key properties on a snapshot update object. ``` Set-AzSnapshotUpdateKeyEncryptionKey [-SnapshotUpdate] [[-KeyUrl] ] - [[-SourceVaultId] ] [-DefaultProfile ] + [[-SourceVaultId] ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -71,6 +71,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -SnapshotUpdate Specifies a local snapshot update object. diff --git a/src/Compute/Compute/help/Set-AzVM.md b/src/Compute/Compute/help/Set-AzVM.md index 4478a33f9f85..327c595411e0 100644 --- a/src/Compute/Compute/help/Set-AzVM.md +++ b/src/Compute/Compute/help/Set-AzVM.md @@ -16,49 +16,49 @@ This cmdlet can be used to do the followings: reapply or redeploy a virtual mach ### GeneralizeResourceGroupNameParameterSetName (Default) ``` Set-AzVM [-ResourceGroupName] [-Name] [-Generalized] [-AsJob] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### RedeployResourceGroupNameParameterSetName ``` Set-AzVM [-ResourceGroupName] [-Name] [-Redeploy] [-AsJob] [-NoWait] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ReapplyResourceGroupNameParameterSetName ``` Set-AzVM [-ResourceGroupName] [-Name] [-Reapply] [-AsJob] [-NoWait] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### SimulateEvictionResourceGroupNameParameterSetName ``` Set-AzVM [-ResourceGroupName] [-Name] [-SimulateEviction] [-AsJob] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GeneralizeIdParameterSetName ``` Set-AzVM [-Id] [-Generalized] [-AsJob] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### RedeployIdParameterSetName ``` Set-AzVM [-Id] [-Redeploy] [-AsJob] [-NoWait] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### ReapplyIdParameterSetName ``` Set-AzVM [-Id] [-Reapply] [-AsJob] [-NoWait] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### SimulateEvictionIdParameterSetName ``` Set-AzVM [-Id] [-SimulateEviction] [-AsJob] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -189,6 +189,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 +``` + ### -Reapply To reapply virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMADDomainExtension.md b/src/Compute/Compute/help/Set-AzVMADDomainExtension.md index 65e8fa249d10..2384d2566632 100644 --- a/src/Compute/Compute/help/Set-AzVMADDomainExtension.md +++ b/src/Compute/Compute/help/Set-AzVMADDomainExtension.md @@ -17,7 +17,7 @@ Adds an AD domain extension to a virtual machine. Set-AzVMADDomainExtension -DomainName [-OUPath ] [-JoinOption ] [-Credential ] [-Restart] [-ResourceGroupName] [-VMName] -Name [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -201,6 +201,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group. diff --git a/src/Compute/Compute/help/Set-AzVMAEMExtension.md b/src/Compute/Compute/help/Set-AzVMAEMExtension.md index 8c04af4ebfc4..9aec5925335b 100644 --- a/src/Compute/Compute/help/Set-AzVMAEMExtension.md +++ b/src/Compute/Compute/help/Set-AzVMAEMExtension.md @@ -18,7 +18,7 @@ Set-AzVMAEMExtension [-ResourceGroupName] [-VMName] [-EnableWA [[-WADStorageAccountName] ] [[-OSType] ] [-SkipStorage] [-NoWait] [-SetAccessToIndividualResources] [-InstallNewExtension] [[-ProxyURI] ] [-DebugExtension] [-PathUserIdentity ] [-SkipIdentity] [-IsTest] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -162,6 +162,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 +``` + ### -ProxyURI Configures the proxy URI that should be used by the VM Extension for SAP. diff --git a/src/Compute/Compute/help/Set-AzVMAccessExtension.md b/src/Compute/Compute/help/Set-AzVMAccessExtension.md index 41bb6b6ab313..ab2cc2e17459 100644 --- a/src/Compute/Compute/help/Set-AzVMAccessExtension.md +++ b/src/Compute/Compute/help/Set-AzVMAccessExtension.md @@ -17,7 +17,7 @@ Adds the VMAccess extension to a virtual machine. Set-AzVMAccessExtension [-Credential ] [-ResourceGroupName] [-VMName] -Name [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -154,6 +154,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMBackupExtension.md b/src/Compute/Compute/help/Set-AzVMBackupExtension.md index e3beeda5ffad..c28178c99308 100644 --- a/src/Compute/Compute/help/Set-AzVMBackupExtension.md +++ b/src/Compute/Compute/help/Set-AzVMBackupExtension.md @@ -15,7 +15,7 @@ Sets the backup extension properties on a virtual machine. ``` Set-AzVMBackupExtension [-ResourceGroupName] [-VMName] [-Name] [-Tag] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -57,6 +57,21 @@ Accept pipeline input: True (ByPropertyName) 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 ```yaml Type: System.String diff --git a/src/Compute/Compute/help/Set-AzVMBginfoExtension.md b/src/Compute/Compute/help/Set-AzVMBginfoExtension.md index 44a4203deaae..a467e6962525 100644 --- a/src/Compute/Compute/help/Set-AzVMBginfoExtension.md +++ b/src/Compute/Compute/help/Set-AzVMBginfoExtension.md @@ -16,7 +16,7 @@ Adds the BGInfo extension to a virtual machine. ``` Set-AzVMBginfoExtension [-ResourceGroupName] [-VMName] -Name [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -129,6 +129,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 Specifies the name of the resource group of the virtual machine to which this cmdlet adds an extension. diff --git a/src/Compute/Compute/help/Set-AzVMBootDiagnostic.md b/src/Compute/Compute/help/Set-AzVMBootDiagnostic.md index c24ba48fc712..62de1a618f77 100644 --- a/src/Compute/Compute/help/Set-AzVMBootDiagnostic.md +++ b/src/Compute/Compute/help/Set-AzVMBootDiagnostic.md @@ -17,13 +17,13 @@ Modifies boot diagnostics properties of a virtual machine. ``` Set-AzVMBootDiagnostic [-VM] [-Enable] [[-ResourceGroupName] ] [[-StorageAccountName] ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### DisableBootDiagnostics ``` Set-AzVMBootDiagnostic [-VM] [-Disable] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -90,6 +90,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 Specifies the name of the resource group of storage account. diff --git a/src/Compute/Compute/help/Set-AzVMChefExtension.md b/src/Compute/Compute/help/Set-AzVMChefExtension.md index 2b7ed25b0216..2e66ff580d43 100644 --- a/src/Compute/Compute/help/Set-AzVMChefExtension.md +++ b/src/Compute/Compute/help/Set-AzVMChefExtension.md @@ -21,7 +21,7 @@ Set-AzVMChefExtension [-ResourceGroupName] [-VMName] [[-TypeHa [-RunList ] [-ChefServerUrl ] [-ValidationClientName ] [-OrganizationName ] [-BootstrapVersion ] [-Linux] [[-Location] ] [[-Name] ] [[-AutoUpgradeMinorVersion] ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Windows @@ -32,7 +32,7 @@ Set-AzVMChefExtension [-ResourceGroupName] [-VMName] [[-TypeHa [-RunList ] [-ChefServerUrl ] [-ValidationClientName ] [-OrganizationName ] [-BootstrapVersion ] [-Windows] [[-Location] ] [[-Name] ] [[-AutoUpgradeMinorVersion] ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -280,6 +280,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group that contains the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md b/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md index 830116c44a53..18101ad8578f 100644 --- a/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md +++ b/src/Compute/Compute/help/Set-AzVMCustomScriptExtension.md @@ -19,7 +19,7 @@ Set-AzVMCustomScriptExtension [-ResourceGroupName] [-VMName] [ -ContainerName -FileName [-StorageAccountName ] [-StorageEndpointSuffix ] [-StorageAccountKey ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -28,7 +28,7 @@ Set-AzVMCustomScriptExtension [-ResourceGroupName] [-VMName] [ Set-AzVMCustomScriptExtension [-ResourceGroupName] [-VMName] [-Name ] [-FileUri ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -38,7 +38,7 @@ Set-AzVMCustomScriptExtension -Name -VMObject -Conta -FileName [-StorageAccountName ] [-StorageEndpointSuffix ] [-StorageAccountKey ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -47,7 +47,7 @@ Set-AzVMCustomScriptExtension -Name -VMObject -Conta Set-AzVMCustomScriptExtension -Name -VMObject [-FileUri ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ByResourceIdWithContainerAndFileNamesParameterSet @@ -56,7 +56,7 @@ Set-AzVMCustomScriptExtension -ResourceId -ContainerName -File [-StorageAccountName ] [-StorageEndpointSuffix ] [-StorageAccountKey ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ByResourceIdWithFileUriParameterSet @@ -64,7 +64,7 @@ Set-AzVMCustomScriptExtension -ResourceId -ContainerName -File Set-AzVMCustomScriptExtension -ResourceId [-FileUri ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ByInputObjectWithContainerAndFileNamesParameterSet @@ -73,7 +73,7 @@ Set-AzVMCustomScriptExtension -InputObject [-StorageAccountName ] [-StorageEndpointSuffix ] [-StorageAccountKey ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] - [-NoWait] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-NoWait] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -82,7 +82,7 @@ Set-AzVMCustomScriptExtension -InputObject [-FileUri ] [-Run ] [-Argument ] [-SecureExecution] [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -326,6 +326,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMDataDisk.md b/src/Compute/Compute/help/Set-AzVMDataDisk.md index 4f6da5853d18..9067e0be8fb3 100644 --- a/src/Compute/Compute/help/Set-AzVMDataDisk.md +++ b/src/Compute/Compute/help/Set-AzVMDataDisk.md @@ -17,14 +17,14 @@ Modifies properties of a virtual machine data disk. ``` Set-AzVMDataDisk [-VM] [-Name] [[-Caching] ] [[-DiskSizeInGB] ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ChangeWithLun ``` Set-AzVMDataDisk [-VM] [-Lun] [[-Caching] ] [[-DiskSizeInGB] ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -154,6 +154,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -StorageAccountType The virtual machine managed disk's account type. diff --git a/src/Compute/Compute/help/Set-AzVMDiagnosticsExtension.md b/src/Compute/Compute/help/Set-AzVMDiagnosticsExtension.md index 5c7461e967d4..97de62a70d77 100644 --- a/src/Compute/Compute/help/Set-AzVMDiagnosticsExtension.md +++ b/src/Compute/Compute/help/Set-AzVMDiagnosticsExtension.md @@ -18,7 +18,7 @@ Set-AzVMDiagnosticsExtension [-ResourceGroupName] [-VMName] [-DiagnosticsConfigurationPath] [[-StorageAccountName] ] [[-StorageAccountKey] ] [[-StorageAccountEndpoint] ] [[-StorageContext] ] [[-Location] ] [[-Name] ] [[-TypeHandlerVersion] ] [[-AutoUpgradeMinorVersion] ] [-NoWait] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -144,6 +144,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md b/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md index 33dbdd55682c..025a1ba028b8 100644 --- a/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md +++ b/src/Compute/Compute/help/Set-AzVMDiskEncryptionExtension.md @@ -21,7 +21,7 @@ Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [[-SequenceVersion] ] [[-TypeHandlerVersion] ] [[-Name] ] [[-Passphrase] ] [-Force] [-DisableAutoUpgradeMinorVersion] [-SkipVmBackup] [-ExtensionType ] [-ExtensionPublisherName ] [-EncryptFormatAll] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AADClientSecretParameterSet @@ -32,7 +32,7 @@ Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [[-VolumeType] ] [[-SequenceVersion] ] [[-TypeHandlerVersion] ] [[-Name] ] [[-Passphrase] ] [-Force] [-DisableAutoUpgradeMinorVersion] [-SkipVmBackup] [-ExtensionType ] [-ExtensionPublisherName ] [-EncryptFormatAll] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AADClientCertParameterSet @@ -43,7 +43,7 @@ Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [[-VolumeType] ] [[-SequenceVersion] ] [[-TypeHandlerVersion] ] [[-Name] ] [[-Passphrase] ] [-Force] [-DisableAutoUpgradeMinorVersion] [-SkipVmBackup] [-ExtensionType ] [-ExtensionPublisherName ] [-EncryptFormatAll] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### MigrateADEVersionParameterSet @@ -52,7 +52,7 @@ Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [[-KeyEncryptionAlgorithm] ] [[-VolumeType] ] [[-SequenceVersion] ] [[-TypeHandlerVersion] ] [[-Name] ] [[-Passphrase] ] [-Force] [-DisableAutoUpgradeMinorVersion] [-SkipVmBackup] [-ExtensionType ] [-ExtensionPublisherName ] - [-EncryptFormatAll] [-Migrate] [-DefaultProfile ] + [-EncryptFormatAll] [-Migrate] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -63,7 +63,7 @@ Set-AzVMDiskEncryptionExtension [-ResourceGroupName] [-VMName] [[-TypeHandlerVersion] ] [[-Name] ] [[-Passphrase] ] [-Force] [-DisableAutoUpgradeMinorVersion] [-SkipVmBackup] [-ExtensionType ] [-ExtensionPublisherName ] [-EncryptFormatAll] [-MigrationRecovery] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -539,6 +539,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMDscExtension.md b/src/Compute/Compute/help/Set-AzVMDscExtension.md index 18a998e17617..64306b08ccef 100644 --- a/src/Compute/Compute/help/Set-AzVMDscExtension.md +++ b/src/Compute/Compute/help/Set-AzVMDscExtension.md @@ -19,7 +19,7 @@ Set-AzVMDscExtension [-ResourceGroupName] [-VMName] [-Name ] [-ArchiveContainerName ] [-ConfigurationName ] [-ConfigurationArgument ] [-ConfigurationData ] [-Version] [-Force] [-Location ] [-AutoUpdate] [-WmfVersion ] [-DataCollection ] [-NoWait] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -289,6 +289,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMExtension.md b/src/Compute/Compute/help/Set-AzVMExtension.md index 0cab623b52a2..faabbf4b6186 100644 --- a/src/Compute/Compute/help/Set-AzVMExtension.md +++ b/src/Compute/Compute/help/Set-AzVMExtension.md @@ -19,7 +19,7 @@ Set-AzVMExtension -Publisher -ExtensionType [-Settings ] [-EnableAutomaticUpgrade ] [-AsJob] [-ResourceGroupName] [-VMName] -Name [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SettingString @@ -28,7 +28,7 @@ Set-AzVMExtension -Publisher -ExtensionType [-SettingString ] [-EnableAutomaticUpgrade ] [-AsJob] [-ResourceGroupName] [-VMName] -Name [-TypeHandlerVersion ] [-Location ] [-DisableAutoUpgradeMinorVersion] [-ForceRerun ] [-NoWait] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -200,6 +200,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 +``` + ### -ProtectedSettings Specifies private configuration for the extension, as a hash table. This cmdlet encrypts the private configuration. diff --git a/src/Compute/Compute/help/Set-AzVMOSDisk.md b/src/Compute/Compute/help/Set-AzVMOSDisk.md index e5cd16ef3f97..77e408a9b95f 100644 --- a/src/Compute/Compute/help/Set-AzVMOSDisk.md +++ b/src/Compute/Compute/help/Set-AzVMOSDisk.md @@ -20,7 +20,7 @@ Set-AzVMOSDisk [-VM] [[-Name] ] [[-VhdUri] ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] [-DiffDiskSetting ] [-DiffDiskPlacement ] [-DeleteOption ] [-SecurityEncryptionType ] [-SecureVMDiskEncryptionSet ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### WindowsParamSet @@ -30,7 +30,7 @@ Set-AzVMOSDisk [-VM] [[-Name] ] [[-VhdUri] ] [-ManagedDiskId ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] [-DiffDiskSetting ] [-DiffDiskPlacement ] [-DeleteOption ] [-SecurityEncryptionType ] [-SecureVMDiskEncryptionSet ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### WindowsDiskEncryptionParameterSet @@ -41,7 +41,7 @@ Set-AzVMOSDisk [-VM] [[-Name] ] [[-VhdUri] ] [-DiskSizeInGB ] [-ManagedDiskId ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] [-DiffDiskSetting ] [-DiffDiskPlacement ] [-DeleteOption ] [-SecurityEncryptionType ] [-SecureVMDiskEncryptionSet ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### LinuxParamSet @@ -51,7 +51,7 @@ Set-AzVMOSDisk [-VM] [[-Name] ] [[-VhdUri] ] [-ManagedDiskId ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] [-DiffDiskSetting ] [-DiffDiskPlacement ] [-DeleteOption ] [-SecurityEncryptionType ] [-SecureVMDiskEncryptionSet ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### LinuxDiskEncryptionParameterSet @@ -62,7 +62,7 @@ Set-AzVMOSDisk [-VM] [[-Name] ] [[-VhdUri] ] [-DiskSizeInGB ] [-ManagedDiskId ] [-StorageAccountType ] [-DiskEncryptionSetId ] [-WriteAccelerator] [-DiffDiskSetting ] [-DiffDiskPlacement ] [-DeleteOption ] [-SecurityEncryptionType ] [-SecureVMDiskEncryptionSet ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -442,6 +442,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 +``` + ### -SecureVMDiskEncryptionSet ARM Resource ID for Disk Encryption Set. Allows customer to provide ARM ID for Disk Encryption Set created with ConfidentialVmEncryptedWithCustomerKey encryption type. This will allow customer to use Customer Managed Key (CMK) encryption with Confidential VM. Parameter SecurityEncryptionType value should be DiskwithVMGuestState. diff --git a/src/Compute/Compute/help/Set-AzVMOperatingSystem.md b/src/Compute/Compute/help/Set-AzVMOperatingSystem.md index 18a139dbf320..e89e9603720d 100644 --- a/src/Compute/Compute/help/Set-AzVMOperatingSystem.md +++ b/src/Compute/Compute/help/Set-AzVMOperatingSystem.md @@ -18,7 +18,7 @@ Sets operating system properties during the creation of a new virtual machine or Set-AzVMOperatingSystem [-VM] [-Windows] [[-ComputerName] ] [[-Credential] ] [[-CustomData] ] [-ProvisionVMAgent] [-EnableAutoUpdate] [[-TimeZone] ] [-WinRMHttp] [-PatchMode ] [-EnableHotpatching] [-AssessmentMode ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### WindowsWinRmHttps @@ -27,7 +27,7 @@ Set-AzVMOperatingSystem [-VM] [-Windows] [[-ComputerName] ] [[-CustomData] ] [-ProvisionVMAgent] [-EnableAutoUpdate] [[-TimeZone] ] [-WinRMHttp] [-WinRMHttps] [-WinRMCertificateUrl] [-PatchMode ] [-EnableHotpatching] [-AssessmentMode ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### WindowsDisableVMAgent @@ -35,7 +35,7 @@ Set-AzVMOperatingSystem [-VM] [-Windows] [[-ComputerName] [-Windows] [[-ComputerName] ] [[-Credential] ] [[-CustomData] ] [-DisableVMAgent] [-EnableAutoUpdate] [[-TimeZone] ] [-WinRMHttp] [-PatchMode ] [-EnableHotpatching] [-AssessmentMode ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### WindowsDisableVMAgentWinRmHttps @@ -44,14 +44,14 @@ Set-AzVMOperatingSystem [-VM] [-Windows] [[-ComputerName] ] [[-CustomData] ] [-DisableVMAgent] [-EnableAutoUpdate] [[-TimeZone] ] [-WinRMHttp] [-WinRMHttps] [-WinRMCertificateUrl] [-PatchMode ] [-EnableHotpatching] [-AssessmentMode ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Linux ``` Set-AzVMOperatingSystem [-VM] [-Linux] [[-ComputerName] ] [[-Credential] ] [[-CustomData] ] [-PatchMode ] [-DisablePasswordAuthentication] - [-AssessmentMode ] [-DefaultProfile ] + [-AssessmentMode ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -319,6 +319,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProvisionVMAgent Indicates that the settings require that the virtual machine agent be installed on the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMPlan.md b/src/Compute/Compute/help/Set-AzVMPlan.md index ce45937f6541..1e15693b862b 100644 --- a/src/Compute/Compute/help/Set-AzVMPlan.md +++ b/src/Compute/Compute/help/Set-AzVMPlan.md @@ -15,7 +15,7 @@ Sets the Marketplace plan information on a virtual machine. ``` Set-AzVMPlan [-VM] [-Name] [[-Product] ] [[-PromotionCode] ] - [[-Publisher] ] [-DefaultProfile ] + [[-Publisher] ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -87,6 +87,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PromotionCode Specifies a promotion code. diff --git a/src/Compute/Compute/help/Set-AzVMRunCommand.md b/src/Compute/Compute/help/Set-AzVMRunCommand.md index f8675f8b724c..f8c2e1d06717 100644 --- a/src/Compute/Compute/help/Set-AzVMRunCommand.md +++ b/src/Compute/Compute/help/Set-AzVMRunCommand.md @@ -23,7 +23,7 @@ Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ScriptLocalPath @@ -36,7 +36,7 @@ Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-Tag ] [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] -ScriptLocalPath - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -328,6 +328,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 +``` + ### -ProtectedParameter The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. diff --git a/src/Compute/Compute/help/Set-AzVMSecurityProfile.md b/src/Compute/Compute/help/Set-AzVMSecurityProfile.md index 281739572559..98dc2cc8f127 100644 --- a/src/Compute/Compute/help/Set-AzVMSecurityProfile.md +++ b/src/Compute/Compute/help/Set-AzVMSecurityProfile.md @@ -14,7 +14,7 @@ Sets the SecurityType enum for Virtual Machines. ``` Set-AzVMSecurityProfile [-VM] [-SecurityType ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -88,6 +88,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 +``` + ### -SecurityType Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. By default, UefiSettings will not be enabled unless this property is set. diff --git a/src/Compute/Compute/help/Set-AzVMSourceImage.md b/src/Compute/Compute/help/Set-AzVMSourceImage.md index 15721d3248d1..740213bbd540 100644 --- a/src/Compute/Compute/help/Set-AzVMSourceImage.md +++ b/src/Compute/Compute/help/Set-AzVMSourceImage.md @@ -16,14 +16,14 @@ Specifies the image for a virtual machine. ### ImageReferenceSkuParameterSet (Default) ``` Set-AzVMSourceImage [-VM] [-PublisherName] [-Offer] [-Skus] - [-Version] [-DefaultProfile ] + [-Version] [-DefaultProfile ] [-ProgressAction ] [] ``` ### ImageReferenceIdParameterSet ``` Set-AzVMSourceImage [-VM] [-Id] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -93,6 +93,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublisherName Specifies the name of a publisher of a VMImage. To obtain a publisher, use the Get-AzVMImagePublisher cmdlet. diff --git a/src/Compute/Compute/help/Set-AzVMSqlServerExtension.md b/src/Compute/Compute/help/Set-AzVMSqlServerExtension.md index cbbe3072afd1..d4f8d16a0dd7 100644 --- a/src/Compute/Compute/help/Set-AzVMSqlServerExtension.md +++ b/src/Compute/Compute/help/Set-AzVMSqlServerExtension.md @@ -17,7 +17,7 @@ Sets the Azure SQL Server extension on a virtual machine. Set-AzVMSqlServerExtension [[-Version] ] [-ResourceGroupName] [-VMName] [[-Name] ] [[-AutoPatchingSettings] ] [[-AutoBackupSettings] ] [[-KeyVaultCredentialSettings] ] - [[-Location] ] [-DefaultProfile ] + [[-Location] ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -143,6 +143,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Set-AzVMUefi.md b/src/Compute/Compute/help/Set-AzVMUefi.md index aa953e026c25..508ef721ed7b 100644 --- a/src/Compute/Compute/help/Set-AzVMUefi.md +++ b/src/Compute/Compute/help/Set-AzVMUefi.md @@ -14,7 +14,7 @@ Modifies UEFI properties of a gen 2 virtual machine ``` Set-AzVMUefi [-VM] [-EnableVtpm ] [-EnableSecureBoot ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -81,6 +81,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VM The virtual machine profile. diff --git a/src/Compute/Compute/help/Set-AzVmss.md b/src/Compute/Compute/help/Set-AzVmss.md index 955c6e1a0cdd..dea3ef89f17c 100644 --- a/src/Compute/Compute/help/Set-AzVmss.md +++ b/src/Compute/Compute/help/Set-AzVmss.md @@ -16,28 +16,28 @@ Sets specific actions on a specified VMSS. ### DefaultParameter (Default) ``` Set-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-TempDisk] - [-Reimage] [-AsJob] [-DefaultProfile ] [-WhatIf] + [-Reimage] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FriendMethod ``` Set-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-ReimageAll] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RedeployMethodParameter ``` Set-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-Redeploy] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PerformMaintenanceMethodParameter ``` Set-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] - [-PerformMaintenance] [-AsJob] [-DefaultProfile ] + [-PerformMaintenance] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -127,6 +127,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 +``` + ### -Redeploy Indicates that the cmdlet redeploys one or more virtual machines in the VMSS. diff --git a/src/Compute/Compute/help/Set-AzVmssBootDiagnostic.md b/src/Compute/Compute/help/Set-AzVmssBootDiagnostic.md index f553faf1b9e8..98c97a950369 100644 --- a/src/Compute/Compute/help/Set-AzVmssBootDiagnostic.md +++ b/src/Compute/Compute/help/Set-AzVmssBootDiagnostic.md @@ -14,7 +14,7 @@ Sets the virtual machine scale set boot diagnostics profile. ``` Set-AzVmssBootDiagnostic [-VirtualMachineScaleSet] [[-Enabled] ] - [[-StorageUri] ] [-DefaultProfile ] + [[-StorageUri] ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -64,6 +64,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -StorageUri URI of the storage account to use for placing the console output and screenshot. diff --git a/src/Compute/Compute/help/Set-AzVmssDiskEncryptionExtension.md b/src/Compute/Compute/help/Set-AzVmssDiskEncryptionExtension.md index e6c08703ec62..e07d31811350 100644 --- a/src/Compute/Compute/help/Set-AzVmssDiskEncryptionExtension.md +++ b/src/Compute/Compute/help/Set-AzVmssDiskEncryptionExtension.md @@ -19,7 +19,7 @@ Set-AzVmssDiskEncryptionExtension [-ResourceGroupName] [-VMScaleSetName [-TypeHandlerVersion ] [-ExtensionPublisherName ] [-ExtensionName ] [-ExtensionType ] [-EncryptFormatAll] [-Passphrase ] [-Force] [-DisableAutoUpgradeMinorVersion] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -274,6 +274,21 @@ Accept pipeline input: True (ByPropertyName) 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 resource group name to which the VM Scale Set belongs to diff --git a/src/Compute/Compute/help/Set-AzVmssOrchestrationServiceState.md b/src/Compute/Compute/help/Set-AzVmssOrchestrationServiceState.md index c68e71a210da..845014f91d00 100644 --- a/src/Compute/Compute/help/Set-AzVmssOrchestrationServiceState.md +++ b/src/Compute/Compute/help/Set-AzVmssOrchestrationServiceState.md @@ -16,13 +16,13 @@ Sets the orchestration service state for the VMSS. ``` Set-AzVmssOrchestrationServiceState [-ResourceGroupName] [-VMScaleSetName] [-ServiceName] [-Action] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Set-AzVmssOrchestrationServiceState [-ServiceName] [-Action] [-ResourceId] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -30,7 +30,7 @@ Set-AzVmssOrchestrationServiceState [-ServiceName] [-Action] [ ``` Set-AzVmssOrchestrationServiceState [-ServiceName] [-Action] [-InputObject] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -114,6 +114,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. diff --git a/src/Compute/Compute/help/Set-AzVmssOsProfile.md b/src/Compute/Compute/help/Set-AzVmssOsProfile.md index 06d4a1037795..f0fb5da2babc 100644 --- a/src/Compute/Compute/help/Set-AzVmssOsProfile.md +++ b/src/Compute/Compute/help/Set-AzVmssOsProfile.md @@ -22,7 +22,7 @@ Set-AzVmssOsProfile [-VirtualMachineScaleSet] [[-Comp [[-LinuxConfigurationDisablePasswordAuthentication] ] [[-PublicKey] ] [[-Secret] ] [-WindowsConfigurationPatchMode ] [-LinuxConfigurationPatchMode ] [-EnableHotpatching] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -371,6 +371,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicKey Specifies the Secure Shell (SSH) public key object. You can use the Add-AzVMSshPublicKey cmdlet to create the object. diff --git a/src/Compute/Compute/help/Set-AzVmssRollingUpgradePolicy.md b/src/Compute/Compute/help/Set-AzVmssRollingUpgradePolicy.md index 9b7dae717f34..16e989657627 100644 --- a/src/Compute/Compute/help/Set-AzVmssRollingUpgradePolicy.md +++ b/src/Compute/Compute/help/Set-AzVmssRollingUpgradePolicy.md @@ -17,7 +17,7 @@ Set-AzVmssRollingUpgradePolicy [-VirtualMachineScaleSet] ] [[-MaxUnhealthyInstancePercent] ] [[-MaxUnhealthyUpgradedInstancePercent] ] [-PauseTimeBetweenBatches ] [-EnableCrossZoneUpgrade ] [-PrioritizeUnhealthyInstance ] [-MaxSurge ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -164,6 +164,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet Specifies the VMSS object. You can use the New-AzVmssConfig cmdlet to create the object. diff --git a/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md b/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md index 1eed7f9914fd..a06ea4734900 100644 --- a/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md +++ b/src/Compute/Compute/help/Set-AzVmssSecurityProfile.md @@ -14,7 +14,7 @@ This cmdlet allows users to set the SecurityType enum for Virtual Machines scale ``` Set-AzVmssSecurityProfile [-VirtualMachineScaleSet] [[-SecurityType] ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -404,6 +404,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 +``` + ### -SecurityType Parameter to set the SecurityType on the VMs of the scale set. diff --git a/src/Compute/Compute/help/Set-AzVmssStorageProfile.md b/src/Compute/Compute/help/Set-AzVmssStorageProfile.md index 5ce968861ce7..0ce7fc9fe901 100644 --- a/src/Compute/Compute/help/Set-AzVmssStorageProfile.md +++ b/src/Compute/Compute/help/Set-AzVmssStorageProfile.md @@ -23,7 +23,7 @@ Set-AzVmssStorageProfile [-VirtualMachineScaleSet] [-DiskEncryptionSetId ] [-DataDisk ] [-OSDiskSizeGB ] [-DiskControllerType ] [-SecurityEncryptionType ] [-SecureVMDiskEncryptionSet ] [-SharedGalleryImageId ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -364,6 +364,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 +``` + ### -SecureVMDiskEncryptionSet ResourceId of the disk encryption set to use for enabling encryption at rest. diff --git a/src/Compute/Compute/help/Set-AzVmssUefi.md b/src/Compute/Compute/help/Set-AzVmssUefi.md index 2a8ee0db9480..3ec65307e279 100644 --- a/src/Compute/Compute/help/Set-AzVmssUefi.md +++ b/src/Compute/Compute/help/Set-AzVmssUefi.md @@ -15,7 +15,7 @@ Modifies UEFI properties of gen 2 virtual machines that are part of virtual mach ``` Set-AzVmssUefi [-VirtualMachineScaleSet] [[-EnableVtpm] ] [[-EnableSecureBoot] ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -82,6 +82,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -VirtualMachineScaleSet The virtual machine scale set profile. diff --git a/src/Compute/Compute/help/Set-AzVmssVM.md b/src/Compute/Compute/help/Set-AzVmssVM.md index 80aa64e2484b..686a611789ac 100644 --- a/src/Compute/Compute/help/Set-AzVmssVM.md +++ b/src/Compute/Compute/help/Set-AzVmssVM.md @@ -16,35 +16,35 @@ Modifies the state of a VMSS instance. ### DefaultParameter (Default) ``` Set-AzVmssVM [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] [-Reimage] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FriendMethod ``` Set-AzVmssVM [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] [-ReimageAll] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RedeployMethodParameter ``` Set-AzVmssVM [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] [-Redeploy] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PerformMaintenanceMethodParameter ``` Set-AzVmssVM [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] - [-PerformMaintenance] [-AsJob] [-DefaultProfile ] + [-PerformMaintenance] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SimulateEvictionMethodParameter ``` Set-AzVmssVM [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] - [-SimulateEviction] [-AsJob] [-DefaultProfile ] + [-SimulateEviction] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -137,6 +137,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 +``` + ### -Redeploy Indicates that this cmdlet redeploys a virtual machine in the VMSS. diff --git a/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md b/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md index 2a730ee00a21..fa88c0010709 100644 --- a/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md +++ b/src/Compute/Compute/help/Set-AzVmssVMRunCommand.md @@ -23,7 +23,7 @@ Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunComm [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -38,7 +38,7 @@ Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunComm [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-Tag ] [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] -ScriptLocalPath [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -344,6 +344,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 +``` + ### -ProtectedParameter The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. diff --git a/src/Compute/Compute/help/Start-AzVM.md b/src/Compute/Compute/help/Start-AzVM.md index 3bd528347648..86bafceb76c0 100644 --- a/src/Compute/Compute/help/Start-AzVM.md +++ b/src/Compute/Compute/help/Start-AzVM.md @@ -16,14 +16,14 @@ Starts an Azure virtual machine. ### ResourceGroupNameParameterSetName (Default) ``` Start-AzVM [-Name] [-NoWait] [-ResourceGroupName] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IdParameterSetName ``` Start-AzVM [-NoWait] [-Id] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -115,6 +115,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Start-AzVmss.md b/src/Compute/Compute/help/Start-AzVmss.md index f414613cfbb8..c2f0ed899553 100644 --- a/src/Compute/Compute/help/Start-AzVmss.md +++ b/src/Compute/Compute/help/Start-AzVmss.md @@ -15,7 +15,7 @@ Starts the VMSS or a set of virtual machines within the VMSS. ``` Start-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -87,6 +87,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the VMSS. diff --git a/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md b/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md index 91f356ea8af3..53ed2aea6a9a 100644 --- a/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md +++ b/src/Compute/Compute/help/Start-AzVmssRollingExtensionUpgrade.md @@ -15,21 +15,21 @@ This cmdlet starts a rolling upgrade for all extensions on the given Virtual Mac ### DefaultParameter (Default) ``` Start-AzVmssRollingExtensionUpgrade -ResourceGroupName -VMScaleSetName [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ByInputObject ``` Start-AzVmssRollingExtensionUpgrade -VirtualMachineScaleSet [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ByResourceId ``` Start-AzVmssRollingExtensionUpgrade -ResourceId [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -79,6 +79,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. diff --git a/src/Compute/Compute/help/Start-AzVmssRollingOSUpgrade.md b/src/Compute/Compute/help/Start-AzVmssRollingOSUpgrade.md index a57ca015c140..efcb965cf8f1 100644 --- a/src/Compute/Compute/help/Start-AzVmssRollingOSUpgrade.md +++ b/src/Compute/Compute/help/Start-AzVmssRollingOSUpgrade.md @@ -14,7 +14,7 @@ Starts a rolling upgrade to move all virtual machine scale set instances to the ``` Start-AzVmssRollingOSUpgrade [-ResourceGroupName] [-VMScaleSetName] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -63,6 +63,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. diff --git a/src/Compute/Compute/help/Stop-AzVM.md b/src/Compute/Compute/help/Stop-AzVM.md index c593e9ab073a..82d2bbf8bd79 100644 --- a/src/Compute/Compute/help/Stop-AzVM.md +++ b/src/Compute/Compute/help/Stop-AzVM.md @@ -16,28 +16,28 @@ Stops an Azure virtual machine. ### ResourceGroupNameParameterSetName (Default) ``` Stop-AzVM [-ResourceGroupName] [-Name] [-Force] [-StayProvisioned] [-NoWait] [-SkipShutdown] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceGroupHibernateParameterSet ``` Stop-AzVM [-ResourceGroupName] [-Name] [-Force] [-NoWait] [-Hibernate] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IdParameterSetName ``` Stop-AzVM [-Force] [-StayProvisioned] [-NoWait] [-SkipShutdown] [-Id] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IdHibernateParameterSet ``` Stop-AzVM [-Force] [-NoWait] [-Hibernate] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -159,6 +159,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 Specifies the name of the resource group of the virtual machine. diff --git a/src/Compute/Compute/help/Stop-AzVmss.md b/src/Compute/Compute/help/Stop-AzVmss.md index b590c55f84cb..670375134ca5 100644 --- a/src/Compute/Compute/help/Stop-AzVmss.md +++ b/src/Compute/Compute/help/Stop-AzVmss.md @@ -16,7 +16,7 @@ Stops the VMSS or a set of virtual machines within the VMSS. ### DefaultParameter (Default) ``` Stop-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-Force] - [-AsJob] [-Hibernate] [-DefaultProfile ] + [-AsJob] [-Hibernate] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Stop-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-Instance ``` Stop-AzVmss [-ResourceGroupName] [-VMScaleSetName] [[-InstanceId] ] [-Force] [-StayProvisioned] [-SkipShutdown] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -125,6 +125,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the VMSS. diff --git a/src/Compute/Compute/help/Stop-AzVmssRollingUpgrade.md b/src/Compute/Compute/help/Stop-AzVmssRollingUpgrade.md index 9453ed70a586..bbdac1bdfcae 100644 --- a/src/Compute/Compute/help/Stop-AzVmssRollingUpgrade.md +++ b/src/Compute/Compute/help/Stop-AzVmssRollingUpgrade.md @@ -14,7 +14,7 @@ Cancels the current virtual machine scale set rolling upgrade. ``` Stop-AzVmssRollingUpgrade [-ResourceGroupName] [-VMScaleSetName] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,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. diff --git a/src/Compute/Compute/help/Test-AzVMAEMExtension.md b/src/Compute/Compute/help/Test-AzVMAEMExtension.md index 73843dae0009..b4d29c1ca5a3 100644 --- a/src/Compute/Compute/help/Test-AzVMAEMExtension.md +++ b/src/Compute/Compute/help/Test-AzVMAEMExtension.md @@ -16,7 +16,7 @@ Checks the configuration of the AEM extension. ``` Test-AzVMAEMExtension [-ResourceGroupName] [-VMName] [[-OSType] ] [[-WaitTimeInMinutes] ] [-SkipStorageCheck] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -67,6 +67,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 Specifies the name of the resource group of the virtual machine that this cmdlet checks. diff --git a/src/Compute/Compute/help/Update-AzAvailabilitySet.md b/src/Compute/Compute/help/Update-AzAvailabilitySet.md index ddb044a8993d..48fb4a2fd02b 100644 --- a/src/Compute/Compute/help/Update-AzAvailabilitySet.md +++ b/src/Compute/Compute/help/Update-AzAvailabilitySet.md @@ -15,7 +15,7 @@ Updates an availability set. ``` Update-AzAvailabilitySet [-AvailabilitySet] [[-Sku] ] [-ProximityPlacementGroupId ] [-Tag ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -77,6 +77,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 +``` + ### -ProximityPlacementGroupId The resource id of the Proximity Placement Group to use with this availability set. diff --git a/src/Compute/Compute/help/Update-AzCapacityReservation.md b/src/Compute/Compute/help/Update-AzCapacityReservation.md index fde8482ed8f1..b17f66b4df49 100644 --- a/src/Compute/Compute/help/Update-AzCapacityReservation.md +++ b/src/Compute/Compute/help/Update-AzCapacityReservation.md @@ -15,7 +15,7 @@ Update the Capacity Reservation. ### DefaultParameter (Default) ``` Update-AzCapacityReservation [-CapacityToReserve ] [-AsJob] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -23,20 +23,20 @@ Update-AzCapacityReservation [-CapacityToReserve ] [-AsJob] [-Tag -ReservationGroupName -Name [-CapacityToReserve ] [-AsJob] [-Tag ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` Update-AzCapacityReservation -CapacityReservation [-CapacityToReserve ] [-AsJob] - [-Tag ] [-DefaultProfile ] [-WhatIf] + [-Tag ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Update-AzCapacityReservation -ResourceId [-CapacityToReserve ] [-AsJob] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -136,6 +136,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ReservationGroupName Name of the Capacity Reservation Group that the capacity reservation resource is in. diff --git a/src/Compute/Compute/help/Update-AzCapacityReservationGroup.md b/src/Compute/Compute/help/Update-AzCapacityReservationGroup.md index 48a19726adb6..a011f4fef253 100644 --- a/src/Compute/Compute/help/Update-AzCapacityReservationGroup.md +++ b/src/Compute/Compute/help/Update-AzCapacityReservationGroup.md @@ -15,14 +15,14 @@ Update the Capacity Reservation Group. ### DefaultParameter (Default) ``` Update-AzCapacityReservationGroup [-SharingProfile ] [-AsJob] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DefaultParameterSet ``` Update-AzCapacityReservationGroup -ResourceGroupName -Name [-SharingProfile ] - [-AsJob] [-Tag ] [-DefaultProfile ] + [-AsJob] [-Tag ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -30,13 +30,13 @@ Update-AzCapacityReservationGroup -ResourceGroupName -Name [-S ``` Update-AzCapacityReservationGroup -CapacityReservationGroup [-SharingProfile ] [-AsJob] [-Tag ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Update-AzCapacityReservationGroup -ResourceId [-SharingProfile ] [-AsJob] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -121,6 +121,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Update-AzDisk.md b/src/Compute/Compute/help/Update-AzDisk.md index dd5494ebca38..fb3df2c93978 100644 --- a/src/Compute/Compute/help/Update-AzDisk.md +++ b/src/Compute/Compute/help/Update-AzDisk.md @@ -15,14 +15,14 @@ Updates a disk. ### DefaultParameter (Default) ``` Update-AzDisk [-ResourceGroupName] [-DiskName] [-DiskUpdate] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FriendMethod ``` Update-AzDisk [-ResourceGroupName] [-DiskName] [-Disk] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -140,6 +140,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Update-AzDiskEncryptionSet.md b/src/Compute/Compute/help/Update-AzDiskEncryptionSet.md index 27aa6e0c033a..13e21794c8aa 100644 --- a/src/Compute/Compute/help/Update-AzDiskEncryptionSet.md +++ b/src/Compute/Compute/help/Update-AzDiskEncryptionSet.md @@ -17,7 +17,7 @@ Updates a disk encryption set. Update-AzDiskEncryptionSet [-ResourceGroupName] [-Name] [-KeyUrl ] [-SourceVaultId ] [-RotationToLatestKeyVersionEnabled ] [[-Tag] ] [-AsJob] [-FederatedClientId ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter @@ -25,7 +25,7 @@ Update-AzDiskEncryptionSet [-ResourceGroupName] [-Name] [-KeyU Update-AzDiskEncryptionSet [-ResourceId] [-KeyUrl ] [-SourceVaultId ] [-RotationToLatestKeyVersionEnabled ] [[-Tag] ] [-AsJob] [-FederatedClientId ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter @@ -33,7 +33,7 @@ Update-AzDiskEncryptionSet [-ResourceId] [-KeyUrl ] [-SourceVau Update-AzDiskEncryptionSet [-InputObject] [-KeyUrl ] [-SourceVaultId ] [-RotationToLatestKeyVersionEnabled ] [[-Tag] ] [-AsJob] [-FederatedClientId ] [-UserAssignedIdentity ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -140,6 +140,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Update-AzGallery.md b/src/Compute/Compute/help/Update-AzGallery.md index eb91b401a538..1588bc417712 100644 --- a/src/Compute/Compute/help/Update-AzGallery.md +++ b/src/Compute/Compute/help/Update-AzGallery.md @@ -18,7 +18,7 @@ Update-AzGallery [-ResourceGroupName] [-Name] [-AsJob] [-Descr [-Tag ] [-Permission ] [-Subscription ] [-Tenant ] [-RemoveSubscription ] [-RemoveTenant ] [-Share] [-Community] [-Reset] [-PublisherUri ] [-PublisherContact ] [-Eula ] [-PublicNamePrefix ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -28,7 +28,7 @@ Update-AzGallery [-ResourceId] [-AsJob] [-Description ] [-Tag < [-Permission ] [-Subscription ] [-Tenant ] [-RemoveSubscription ] [-RemoveTenant ] [-Share] [-Community] [-Reset] [-PublisherUri ] [-PublisherContact ] [-Eula ] [-PublicNamePrefix ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -38,7 +38,7 @@ Update-AzGallery [-InputObject] [-AsJob] [-Description ] [-T [-Permission ] [-Subscription ] [-Tenant ] [-RemoveSubscription ] [-RemoveTenant ] [-Share] [-Community] [-Reset] [-PublisherUri ] [-PublisherContact ] [-Eula ] [-PublicNamePrefix ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -183,6 +183,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublicNamePrefix Gets or sets the prefix of the gallery name that will be displayed publicly. Visible to all users. diff --git a/src/Compute/Compute/help/Update-AzGalleryApplication.md b/src/Compute/Compute/help/Update-AzGalleryApplication.md index ea1b1d5b7f2f..a9f421418fb5 100644 --- a/src/Compute/Compute/help/Update-AzGalleryApplication.md +++ b/src/Compute/Compute/help/Update-AzGalleryApplication.md @@ -16,13 +16,13 @@ Update a gallery Application Definition. ``` Update-AzGalleryApplication -GalleryName -Name -ResourceGroupName [-SubscriptionId ] [-Description ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzGalleryApplication -InputObject [-Description ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -150,6 +150,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. diff --git a/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md b/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md index a83832ea9309..dd0e5c699b11 100644 --- a/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute/help/Update-AzGalleryApplicationVersion.md @@ -19,7 +19,7 @@ Update-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName [-DefaultConfigFileLink ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] [-TargetRegion ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded @@ -28,7 +28,7 @@ Update-AzGalleryApplicationVersion -InputObject -PackageFileL [-DefaultConfigFileLink ] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] [-TargetRegion ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -193,6 +193,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 +``` + ### -PublishingProfileEndOfLifeDate The end of life date of the gallery image version. This property can be used for decommissioning purposes. diff --git a/src/Compute/Compute/help/Update-AzGalleryImageDefinition.md b/src/Compute/Compute/help/Update-AzGalleryImageDefinition.md index 2b5ca755bddf..dfba42781a97 100644 --- a/src/Compute/Compute/help/Update-AzGalleryImageDefinition.md +++ b/src/Compute/Compute/help/Update-AzGalleryImageDefinition.md @@ -19,7 +19,7 @@ Update-AzGalleryImageDefinition [-ResourceGroupName] [-GalleryName] ] [-MinimumVCPU ] [-MaximumMemory ] [-MaximumVCPU ] [-PrivacyStatementUri ] [-PurchasePlanName ] [-PurchasePlanProduct ] [-PurchasePlanPublisher ] [-ReleaseNoteUri ] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -30,7 +30,7 @@ Update-AzGalleryImageDefinition [-ResourceId] [-AsJob] [-Description ] [-MaximumMemory ] [-MaximumVCPU ] [-PrivacyStatementUri ] [-PurchasePlanName ] [-PurchasePlanProduct ] [-PurchasePlanPublisher ] [-ReleaseNoteUri ] [-Tag ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter @@ -40,7 +40,7 @@ Update-AzGalleryImageDefinition [-InputObject] [-AsJob] [-Descr [-MinimumVCPU ] [-MaximumMemory ] [-MaximumVCPU ] [-PrivacyStatementUri ] [-PurchasePlanName ] [-PurchasePlanProduct ] [-PurchasePlanPublisher ] [-ReleaseNoteUri ] [-Tag ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -278,6 +278,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PurchasePlanName The ID for the purchase plan. diff --git a/src/Compute/Compute/help/Update-AzGalleryImageVersion.md b/src/Compute/Compute/help/Update-AzGalleryImageVersion.md index 5def0a720ac8..8c6ea68b5bd4 100644 --- a/src/Compute/Compute/help/Update-AzGalleryImageVersion.md +++ b/src/Compute/Compute/help/Update-AzGalleryImageVersion.md @@ -18,7 +18,7 @@ Update-AzGalleryImageVersion [-ResourceGroupName] [-GalleryName] [-Name] [-AsJob] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] [-TargetRegion ] [-TargetExtendedLocation ] [-AllowDeletionOfReplicatedLocation ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -27,7 +27,7 @@ Update-AzGalleryImageVersion [-ResourceGroupName] [-GalleryName] [-AsJob] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] [-TargetRegion ] [-TargetExtendedLocation ] [-AllowDeletionOfReplicatedLocation ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -37,7 +37,7 @@ Update-AzGalleryImageVersion [-InputObject] [-AsJob] [-PublishingProfileEndOfLifeDate ] [-PublishingProfileExcludeFromLatest] [-ReplicaCount ] [-Tag ] [-TargetRegion ] [-TargetExtendedLocation ] [-AllowDeletionOfReplicatedLocation ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -206,6 +206,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -PublishingProfileEndOfLifeDate The end of life date of the gallery Image Version. diff --git a/src/Compute/Compute/help/Update-AzHost.md b/src/Compute/Compute/help/Update-AzHost.md index 9ea3b45c5314..01631474d03d 100644 --- a/src/Compute/Compute/help/Update-AzHost.md +++ b/src/Compute/Compute/help/Update-AzHost.md @@ -16,14 +16,14 @@ Updates the Dedicated Host. ``` Update-AzHost [-ResourceGroupName] [-HostGroupName] [-Name] [-Sku ] [-AutoReplaceOnFailure ] [-LicenseType ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Update-AzHost [-Sku ] [-AutoReplaceOnFailure ] [-LicenseType ] - [-ResourceId] [-DefaultProfile ] + [-ResourceId] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -132,6 +132,21 @@ Accept pipeline input: True (ByPropertyName) 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. diff --git a/src/Compute/Compute/help/Update-AzImage.md b/src/Compute/Compute/help/Update-AzImage.md index 479bcc8bead7..13e006d3a641 100644 --- a/src/Compute/Compute/help/Update-AzImage.md +++ b/src/Compute/Compute/help/Update-AzImage.md @@ -15,20 +15,20 @@ Updates an image. ### DefaultParameter (Default) ``` Update-AzImage [-ResourceGroupName] [-ImageName] [-Tag ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdParameter ``` Update-AzImage [-Tag ] [-AsJob] [-ResourceId] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ObjectParameter ``` Update-AzImage [-Tag ] [-AsJob] [-Image] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -109,6 +109,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Update-AzRestorePointCollection.md b/src/Compute/Compute/help/Update-AzRestorePointCollection.md index e2ca8954a4c3..d98693d6abe6 100644 --- a/src/Compute/Compute/help/Update-AzRestorePointCollection.md +++ b/src/Compute/Compute/help/Update-AzRestorePointCollection.md @@ -14,7 +14,7 @@ Update Restore Point Collection. ``` Update-AzRestorePointCollection [-ResourceGroupName] [-Name] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -62,6 +62,21 @@ Accept pipeline input: True (ByPropertyName) 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 Resource Group Name diff --git a/src/Compute/Compute/help/Update-AzSnapshot.md b/src/Compute/Compute/help/Update-AzSnapshot.md index abaa72fdd4ac..051ede5b92db 100644 --- a/src/Compute/Compute/help/Update-AzSnapshot.md +++ b/src/Compute/Compute/help/Update-AzSnapshot.md @@ -15,14 +15,14 @@ Updates a snapshot. ### DefaultParameter (Default) ``` Update-AzSnapshot [-ResourceGroupName] [-SnapshotName] [-SnapshotUpdate] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FriendMethod ``` Update-AzSnapshot [-ResourceGroupName] [-SnapshotName] [-Snapshot] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -95,6 +95,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 Specifies the name of a resource group. diff --git a/src/Compute/Compute/help/Update-AzSshKey.md b/src/Compute/Compute/help/Update-AzSshKey.md index 62701d56600f..5bd6a1da3e48 100644 --- a/src/Compute/Compute/help/Update-AzSshKey.md +++ b/src/Compute/Compute/help/Update-AzSshKey.md @@ -15,20 +15,20 @@ Update a SSH Public Key resource. ### DefaultParameterSet (Default) ``` Update-AzSshKey -ResourceGroupName -Name -PublicKey - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceIDParameterSet ``` Update-AzSshKey -ResourceId -PublicKey [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` Update-AzSshKey -InputObject -PublicKey - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -92,6 +92,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: True ``` +### -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 +``` + ### -PublicKey Public Key value. diff --git a/src/Compute/Compute/help/Update-AzVM.md b/src/Compute/Compute/help/Update-AzVM.md index 019c657989c8..25a765f6ea50 100644 --- a/src/Compute/Compute/help/Update-AzVM.md +++ b/src/Compute/Compute/help/Update-AzVM.md @@ -21,7 +21,7 @@ Update-AzVM [-ResourceGroupName] -VM [-Tag ] [-CapacityReservationGroupId ] [-AsJob] [-NoWait] [-UserData ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-SecurityType ] [-EnableVtpm ] [-EnableSecureBoot ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ExplicitIdentityParameterSet @@ -32,7 +32,7 @@ Update-AzVM [-ResourceGroupName] -VM [-Tag ] [-VirtualMachineScaleSetId ] [-HostId ] [-CapacityReservationGroupId ] [-AsJob] [-NoWait] [-UserData ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -43,7 +43,7 @@ Update-AzVM [-Id] -VM [-Tag ] [-OsDiskWri [-ProximityPlacementGroupId ] [-VirtualMachineScaleSetId ] [-HostId ] [-CapacityReservationGroupId ] [-AsJob] [-NoWait] [-UserData ] [-HibernationEnabled] [-vCPUCountAvailable ] [-vCPUCountPerCore ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -298,6 +298,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 +``` + ### -ProximityPlacementGroupId The resource id of the Proximity Placement Group to use with this virtual machine. diff --git a/src/Compute/Compute/help/Update-AzVmss.md b/src/Compute/Compute/help/Update-AzVmss.md index 7db2070ef1b2..e7cb4d9d77d9 100644 --- a/src/Compute/Compute/help/Update-AzVmss.md +++ b/src/Compute/Compute/help/Update-AzVmss.md @@ -35,7 +35,7 @@ Update-AzVmss [-ResourceGroupName] [-VMScaleSetName] [-EncryptionAtHost ] [-UserData ] [-BaseRegularPriorityCount ] [-RegularPriorityPercentage ] [-SharedGalleryImageId ] [-OSImageScheduledEventEnabled] [-OSImageScheduledEventNotBeforeTimeoutInMinutes ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -62,7 +62,7 @@ Update-AzVmss [-ResourceGroupName] [-VMScaleSetName] [-EncryptionAtHost ] [-UserData ] [-BaseRegularPriorityCount ] [-RegularPriorityPercentage ] [-SharedGalleryImageId ] [-OSImageScheduledEventEnabled] [-OSImageScheduledEventNotBeforeTimeoutInMinutes ] [-SecurityType ] [-EnableVtpm ] - [-EnableSecureBoot ] [-DefaultProfile ] + [-EnableSecureBoot ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -744,6 +744,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 +``` + ### -ProvisionVMAgent Indicates whether virtual machine agent should be provisioned on the Windows virtual machines in the VMSS. diff --git a/src/Compute/Compute/help/Update-AzVmssInstance.md b/src/Compute/Compute/help/Update-AzVmssInstance.md index e1e49c190b22..9b7af6ec9a93 100644 --- a/src/Compute/Compute/help/Update-AzVmssInstance.md +++ b/src/Compute/Compute/help/Update-AzVmssInstance.md @@ -15,7 +15,7 @@ Starts a manual upgrade of the VMSS instance. ``` Update-AzVmssInstance [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -79,6 +79,21 @@ Accept pipeline input: True (ByPropertyName) 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 Specifies the name of the resource group of the VMSS. diff --git a/src/Compute/Compute/help/Update-AzVmssVM.md b/src/Compute/Compute/help/Update-AzVmssVM.md index 692705cba12b..cc27ea231f11 100644 --- a/src/Compute/Compute/help/Update-AzVmssVM.md +++ b/src/Compute/Compute/help/Update-AzVmssVM.md @@ -17,7 +17,7 @@ Updates the state of a Vmss VM. Update-AzVmssVM [-ResourceGroupName] [-VMScaleSetName] [-InstanceId] [-DataDisk ] [-ProtectFromScaleIn ] [-ProtectFromScaleSetAction ] [-AsJob] [-UserData ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -25,7 +25,7 @@ Update-AzVmssVM [-ResourceGroupName] [-VMScaleSetName] [-Insta ``` Update-AzVmssVM [-DataDisk ] [-ProtectFromScaleIn ] [-ProtectFromScaleSetAction ] [-ResourceId] [-AsJob] [-UserData ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -33,7 +33,7 @@ Update-AzVmssVM [-DataDisk ] [-ProtectFromScaleIn ] [-ProtectFromScaleIn ] [-ProtectFromScaleSetAction ] [-VirtualMachineScaleSetVM] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -140,6 +140,21 @@ Accept pipeline input: True (ByPropertyName) 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 +``` + ### -ProtectFromScaleIn Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation. From 30114301f082a2c9ef81802222c4b04430eddb98 Mon Sep 17 00:00:00 2001 From: NanxiangLiu <33285578+Nickcandy@users.noreply.github.com> Date: Fri, 19 Apr 2024 01:59:51 +0800 Subject: [PATCH 2/4] Update ChangeLog.md --- src/Compute/Compute/ChangeLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index 4902b2e11ed2..13983f3d0d38 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -20,6 +20,7 @@ --> ## Upcoming Release +* Added two new cmdlets `Get-AzSpotPlacementRecommender` and `Invoke-AzSpotPlacementRecommender` ## Version 7.2.0 * Added parameters `-scriptUriManagedIdentity`, `-outputBlobManagedIdentity`, `-errorBlobMangedIdentity`, and `-TreatFailureAsDeploymentFailure` to cmdlets `Set-AzVmRunCommand` and `Set-AzVmssRunCommand`. From 6fbb5d3b2051d184a23a80397873e941af547410 Mon Sep 17 00:00:00 2001 From: NanxiangLiu <33285578+Nickcandy@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:08:19 +0800 Subject: [PATCH 3/4] Update ChangeLog.md --- src/Compute/Compute/ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index 13983f3d0d38..b54f26436e35 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -20,7 +20,7 @@ --> ## Upcoming Release -* Added two new cmdlets `Get-AzSpotPlacementRecommender` and `Invoke-AzSpotPlacementRecommender` +* Added cmdlet `Invoke-AzSpotPlacementRecommender` ## Version 7.2.0 * Added parameters `-scriptUriManagedIdentity`, `-outputBlobManagedIdentity`, `-errorBlobMangedIdentity`, and `-TreatFailureAsDeploymentFailure` to cmdlets `Set-AzVmRunCommand` and `Set-AzVmssRunCommand`. From 256504e3cc56719b8b984d57d6c69ae8db97e739 Mon Sep 17 00:00:00 2001 From: NanxiangLiu <33285578+Nickcandy@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:08:43 +0800 Subject: [PATCH 4/4] Update ChangeLog.md --- src/Compute/Compute/ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index b54f26436e35..813ced9f2565 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -20,7 +20,7 @@ --> ## Upcoming Release -* Added cmdlet `Invoke-AzSpotPlacementRecommender` +* Added cmdlet `Invoke-AzSpotPlacementRecommender`. ## Version 7.2.0 * Added parameters `-scriptUriManagedIdentity`, `-outputBlobManagedIdentity`, `-errorBlobMangedIdentity`, and `-TreatFailureAsDeploymentFailure` to cmdlets `Set-AzVmRunCommand` and `Set-AzVmssRunCommand`.