From cb4c4057dd63df26fb4c31cb6f66cf0e165535dc Mon Sep 17 00:00:00 2001 From: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com> Date: Fri, 23 Jan 2026 16:30:39 +0000 Subject: [PATCH] [skip ci] Archive 99d68617d31163d259d9fdb1307182f303a8d999 --- .../VMware.Autorest/Az.VMware.format.ps1xml | 1022 +++- .../VMware/VMware.Autorest/Az.VMware.psd1 | 2 +- .../Properties/AssemblyInfo.cs | 8 +- .../exports/Get-AzVMwareAddon.ps1 | 6 +- .../exports/Get-AzVMwareAuthorization.ps1 | 9 +- .../exports/Get-AzVMwareCloudLink.ps1 | 9 +- .../exports/Get-AzVMwareCluster.ps1 | 9 +- .../exports/Get-AzVMwareClusterZone.ps1 | 3 +- .../exports/Get-AzVMwareDatastore.ps1 | 12 +- .../Get-AzVMwareGlobalReachConnection.ps1 | 9 +- .../exports/Get-AzVMwareHost.ps1 | 12 +- .../exports/Get-AzVMwareIscsiPath.ps1 | 6 +- .../exports/Get-AzVMwareLicense.ps1 | 248 + .../exports/Get-AzVMwareLicenseProperty.ps1 | 244 + .../exports/Get-AzVMwareMaintenance.ps1 | 328 + .../exports/Get-AzVMwarePlacementPolicy.ps1 | 12 +- .../exports/Get-AzVMwarePrivateCloud.ps1 | 6 +- ...et-AzVMwarePrivateCloudAdminCredential.ps1 | 3 +- .../Get-AzVMwarePrivateCloudVcfLicense.ps1 | 244 + .../Get-AzVMwareProvisionedNetwork.ps1 | 9 +- .../exports/Get-AzVMwarePureStoragePolicy.ps1 | 9 +- .../exports/Get-AzVMwareSku.ps1 | 3 +- .../exports/Get-AzVMwareVirtualMachine.ps1 | 12 +- ...nvoke-AzVMwareInitiateMaintenanceCheck.ps1 | 291 + .../Invoke-AzVMwareRescheduleMaintenance.ps1 | 331 + .../Invoke-AzVMwareScheduleMaintenance.ps1 | 331 + .../exports/New-AzVMwareAddon.ps1 | 3 +- .../exports/New-AzVMwareAuthorization.ps1 | 9 +- .../exports/New-AzVMwareCloudLink.ps1 | 9 +- .../exports/New-AzVMwareCluster.ps1 | 9 +- .../exports/New-AzVMwareDatastore.ps1 | 12 +- .../New-AzVMwareGlobalReachConnection.ps1 | 9 +- .../exports/New-AzVMwareIscsiPath.ps1 | 6 +- .../exports/New-AzVMwareLicense.ps1 | 256 + .../exports/New-AzVMwarePlacementPolicy.ps1 | 12 +- .../exports/New-AzVMwarePrivateCloud.ps1 | 3 +- .../New-AzVMwarePrivateCloudNsxtPassword.ps1 | 6 +- ...ew-AzVMwarePrivateCloudVcenterPassword.ps1 | 6 +- .../exports/New-AzVMwarePureStoragePolicy.ps1 | 11 +- .../exports/ProxyCmdletDefinitions.ps1 | 3930 ++++++++++-- .../exports/Remove-AzVMwareAddon.ps1 | 6 +- .../exports/Remove-AzVMwareAuthorization.ps1 | 9 +- .../exports/Remove-AzVMwareCloudLink.ps1 | 9 +- .../exports/Remove-AzVMwareCluster.ps1 | 9 +- .../exports/Remove-AzVMwareDatastore.ps1 | 12 +- .../Remove-AzVMwareGlobalReachConnection.ps1 | 9 +- .../exports/Remove-AzVMwareIscsiPath.ps1 | 6 +- .../exports/Remove-AzVMwareLicense.ps1 | 264 + .../Remove-AzVMwarePlacementPolicy.ps1 | 12 +- .../exports/Remove-AzVMwarePrivateCloud.ps1 | 6 +- .../Remove-AzVMwarePureStoragePolicy.ps1 | 9 +- ...Test-AzVMwareLocationQuotaAvailability.ps1 | 3 +- ...Test-AzVMwareLocationTrialAvailability.ps1 | 3 +- ...t-AzVMwareServiceComponentAvailability.ps1 | 302 + .../exports/Update-AzVMwareAuthorization.ps1 | 9 +- .../exports/Update-AzVMwareCloudLink.ps1 | 9 +- .../exports/Update-AzVMwareCluster.ps1 | 9 +- .../exports/Update-AzVMwareDatastore.ps1 | 12 +- .../Update-AzVMwareGlobalReachConnection.ps1 | 9 +- .../exports/Update-AzVMwareIscsiPath.ps1 | 6 +- .../exports/Update-AzVMwareLicense.ps1 | 256 + .../Update-AzVMwarePlacementPolicy.ps1 | 12 +- .../exports/Update-AzVMwarePrivateCloud.ps1 | 6 +- .../Update-AzVMwarePureStoragePolicy.ps1 | 9 +- .../VMware/VMware.Autorest/generate-info.json | 2 +- ...anceWhileRescheduleOperation.PowerShell.cs | 185 + ...eWhileRescheduleOperation.TypeConverter.cs | 153 + ...wForMaintenanceWhileRescheduleOperation.cs | 106 + ...aintenanceWhileRescheduleOperation.json.cs | 121 + ...enanceWhileScheduleOperation.PowerShell.cs | 185 + ...nceWhileScheduleOperation.TypeConverter.cs | 153 + ...dowForMaintenanceWhileScheduleOperation.cs | 106 + ...rMaintenanceWhileScheduleOperation.json.cs | 121 + ...ckedDatesConstraintTimeRange.PowerShell.cs | 180 + ...dDatesConstraintTimeRange.TypeConverter.cs | 148 + .../Models/BlockedDatesConstraintTimeRange.cs | 103 + .../BlockedDatesConstraintTimeRange.json.cs | 121 + ...ckedWhileRescheduleOperation.PowerShell.cs | 180 + ...dWhileRescheduleOperation.TypeConverter.cs | 148 + .../Models/BlockedWhileRescheduleOperation.cs | 106 + .../BlockedWhileRescheduleOperation.json.cs | 126 + ...lockedWhileScheduleOperation.PowerShell.cs | 180 + ...kedWhileScheduleOperation.TypeConverter.cs | 147 + .../Models/BlockedWhileScheduleOperation.cs | 106 + .../BlockedWhileScheduleOperation.json.cs | 126 + .../ImpactedMaintenanceResource.PowerShell.cs | 172 + ...pactedMaintenanceResource.TypeConverter.cs | 147 + .../api/Models/ImpactedMaintenanceResource.cs | 80 + .../ImpactedMaintenanceResource.json.cs | 124 + ...ctedMaintenanceResourceError.PowerShell.cs | 196 + ...dMaintenanceResourceError.TypeConverter.cs | 148 + .../ImpactedMaintenanceResourceError.cs | 149 + .../ImpactedMaintenanceResourceError.json.cs | 139 + .../generated/api/Models/Label.PowerShell.cs | 172 + .../api/Models/Label.TypeConverter.cs | 146 + .../generated/api/Models/Label.cs | 74 + .../generated/api/Models/Label.json.cs | 108 + .../api/Models/License.PowerShell.cs | 260 + .../api/Models/License.TypeConverter.cs | 146 + .../generated/api/Models/License.cs | 186 + .../generated/api/Models/License.json.cs | 108 + .../Models/LicenseListResult.PowerShell.cs | 172 + .../Models/LicenseListResult.TypeConverter.cs | 147 + .../generated/api/Models/LicenseListResult.cs | 74 + .../api/Models/LicenseListResult.json.cs | 118 + .../Models/LicenseProperties.PowerShell.cs | 172 + .../Models/LicenseProperties.TypeConverter.cs | 147 + .../generated/api/Models/LicenseProperties.cs | 82 + .../api/Models/LicenseProperties.json.cs | 128 + .../api/Models/Maintenance.PowerShell.cs | 412 ++ .../api/Models/Maintenance.TypeConverter.cs | 147 + .../generated/api/Models/Maintenance.cs | 550 ++ .../generated/api/Models/Maintenance.json.cs | 108 + .../MaintenanceFailedCheck.PowerShell.cs | 172 + .../MaintenanceFailedCheck.TypeConverter.cs | 147 + .../api/Models/MaintenanceFailedCheck.cs | 80 + .../api/Models/MaintenanceFailedCheck.json.cs | 124 + .../MaintenanceListResult.PowerShell.cs | 172 + .../MaintenanceListResult.TypeConverter.cs | 147 + .../api/Models/MaintenanceListResult.cs | 74 + .../api/Models/MaintenanceListResult.json.cs | 118 + ...intenanceManagementOperation.PowerShell.cs | 164 + ...enanceManagementOperation.TypeConverter.cs | 148 + .../Models/MaintenanceManagementOperation.cs | 59 + .../MaintenanceManagementOperation.json.cs | 134 + .../MaintenanceProperties.PowerShell.cs | 324 + .../MaintenanceProperties.TypeConverter.cs | 147 + .../api/Models/MaintenanceProperties.cs | 484 ++ .../api/Models/MaintenanceProperties.json.cs | 174 + .../Models/MaintenanceReadiness.PowerShell.cs | 196 + .../MaintenanceReadiness.TypeConverter.cs | 147 + .../api/Models/MaintenanceReadiness.cs | 153 + .../api/Models/MaintenanceReadiness.json.cs | 139 + ...nceReadinessRefreshOperation.PowerShell.cs | 206 + ...ReadinessRefreshOperation.TypeConverter.cs | 150 + .../MaintenanceReadinessRefreshOperation.cs | 175 + ...intenanceReadinessRefreshOperation.json.cs | 134 + .../MaintenanceReschedule.PowerShell.cs | 172 + .../MaintenanceReschedule.TypeConverter.cs | 147 + .../api/Models/MaintenanceReschedule.cs | 74 + .../api/Models/MaintenanceReschedule.json.cs | 110 + .../Models/MaintenanceSchedule.PowerShell.cs | 172 + .../MaintenanceSchedule.TypeConverter.cs | 147 + .../api/Models/MaintenanceSchedule.cs | 74 + .../api/Models/MaintenanceSchedule.json.cs | 110 + .../api/Models/MaintenanceState.PowerShell.cs | 188 + .../Models/MaintenanceState.TypeConverter.cs | 147 + .../generated/api/Models/MaintenanceState.cs | 116 + .../api/Models/MaintenanceState.json.cs | 114 + .../api/Models/PrivateCloud.PowerShell.cs | 24 + .../generated/api/Models/PrivateCloud.cs | 51 + .../PrivateCloudProperties.PowerShell.cs | 24 + .../api/Models/PrivateCloudProperties.cs | 54 + .../api/Models/PrivateCloudProperties.json.cs | 2 + .../Models/RescheduleOperation.PowerShell.cs | 188 + .../RescheduleOperation.TypeConverter.cs | 147 + .../api/Models/RescheduleOperation.cs | 127 + .../api/Models/RescheduleOperation.json.cs | 131 + ...escheduleOperationConstraint.PowerShell.cs | 164 + ...heduleOperationConstraint.TypeConverter.cs | 147 + .../Models/RescheduleOperationConstraint.cs | 59 + .../RescheduleOperationConstraint.json.cs | 130 + .../Models/ScheduleOperation.PowerShell.cs | 188 + .../Models/ScheduleOperation.TypeConverter.cs | 147 + .../generated/api/Models/ScheduleOperation.cs | 127 + .../api/Models/ScheduleOperation.json.cs | 131 + .../ScheduleOperationConstraint.PowerShell.cs | 164 + ...heduleOperationConstraint.TypeConverter.cs | 147 + .../api/Models/ScheduleOperationConstraint.cs | 59 + .../ScheduleOperationConstraint.json.cs | 134 + .../api/Models/SchedulingWindow.PowerShell.cs | 180 + .../Models/SchedulingWindow.TypeConverter.cs | 147 + .../generated/api/Models/SchedulingWindow.cs | 104 + .../api/Models/SchedulingWindow.json.cs | 118 + .../api/Models/VMwareIdentity.PowerShell.cs | 24 + .../generated/api/Models/VMwareIdentity.cs | 62 + .../api/Models/VMwareIdentity.json.cs | 6 + .../api/Models/Vcf5License.PowerShell.cs | 220 + .../api/Models/Vcf5License.TypeConverter.cs | 147 + .../generated/api/Models/Vcf5License.cs | 187 + .../generated/api/Models/Vcf5License.json.cs | 126 + .../api/Models/VcfLicense.PowerShell.cs | 172 + .../api/Models/VcfLicense.TypeConverter.cs | 146 + .../generated/api/Models/VcfLicense.cs | 82 + .../generated/api/Models/VcfLicense.json.cs | 126 + ...areFirewallLicenseProperties.PowerShell.cs | 220 + ...FirewallLicenseProperties.TypeConverter.cs | 148 + .../Models/VmwareFirewallLicenseProperties.cs | 187 + .../VmwareFirewallLicenseProperties.json.cs | 128 + .../VMware.Autorest/generated/api/VMware.cs | 5335 +++++++++++++++-- .../generated/cmdlets/GetAzVMwareAddon_Get.cs | 2 +- .../GetAzVMwareAddon_GetViaIdentity.cs | 2 +- ...zVMwareAddon_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareAddon_List.cs | 2 +- .../cmdlets/GetAzVMwareAuthorization_Get.cs | 2 +- ...GetAzVMwareAuthorization_GetViaIdentity.cs | 2 +- ...uthorization_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareAuthorization_List.cs | 2 +- .../cmdlets/GetAzVMwareCloudLink_Get.cs | 2 +- .../GetAzVMwareCloudLink_GetViaIdentity.cs | 2 +- ...areCloudLink_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareCloudLink_List.cs | 2 +- .../cmdlets/GetAzVMwareClusterZone_List.cs | 2 +- .../cmdlets/GetAzVMwareCluster_Get.cs | 2 +- .../GetAzVMwareCluster_GetViaIdentity.cs | 2 +- ...MwareCluster_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareCluster_List.cs | 2 +- .../cmdlets/GetAzVMwareDatastore_Get.cs | 2 +- .../GetAzVMwareDatastore_GetViaIdentity.cs | 2 +- ...AzVMwareDatastore_GetViaIdentityCluster.cs | 2 +- ...areDatastore_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareDatastore_List.cs | 2 +- .../GetAzVMwareGlobalReachConnection_Get.cs | 2 +- ...areGlobalReachConnection_GetViaIdentity.cs | 2 +- ...chConnection_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareGlobalReachConnection_List.cs | 2 +- .../generated/cmdlets/GetAzVMwareHost_Get.cs | 2 +- .../cmdlets/GetAzVMwareHost_GetViaIdentity.cs | 2 +- .../GetAzVMwareHost_GetViaIdentityCluster.cs | 2 +- ...AzVMwareHost_GetViaIdentityPrivateCloud.cs | 2 +- .../generated/cmdlets/GetAzVMwareHost_List.cs | 2 +- .../cmdlets/GetAzVMwareIscsiPath_Get.cs | 2 +- .../GetAzVMwareIscsiPath_GetViaIdentity.cs | 2 +- .../cmdlets/GetAzVMwareIscsiPath_List.cs | 2 +- .../cmdlets/GetAzVMwareLicenseProperty_Get.cs | 510 ++ ...tAzVMwareLicenseProperty_GetViaIdentity.cs | 488 ++ .../cmdlets/GetAzVMwareLicense_Get.cs | 507 ++ .../GetAzVMwareLicense_GetViaIdentity.cs | 485 ++ .../cmdlets/GetAzVMwareLicense_List.cs | 534 ++ .../cmdlets/GetAzVMwareMaintenance_Get.cs | 522 ++ .../GetAzVMwareMaintenance_GetViaIdentity.cs | 489 ++ ...eMaintenance_GetViaIdentityPrivateCloud.cs | 501 ++ .../cmdlets/GetAzVMwareMaintenance_List.cs | 592 ++ .../cmdlets/GetAzVMwareOperation_List.cs | 2 +- .../cmdlets/GetAzVMwarePlacementPolicy_Get.cs | 2 +- ...tAzVMwarePlacementPolicy_GetViaIdentity.cs | 2 +- ...rePlacementPolicy_GetViaIdentityCluster.cs | 2 +- ...cementPolicy_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwarePlacementPolicy_List.cs | 2 +- ...zVMwarePrivateCloudAdminCredential_List.cs | 2 +- .../GetAzVMwarePrivateCloudVcfLicense_Get.cs | 510 ++ ...rePrivateCloudVcfLicense_GetViaIdentity.cs | 488 ++ .../cmdlets/GetAzVMwarePrivateCloud_Get.cs | 2 +- .../GetAzVMwarePrivateCloud_GetViaIdentity.cs | 2 +- .../cmdlets/GetAzVMwarePrivateCloud_List.cs | 2 +- .../cmdlets/GetAzVMwarePrivateCloud_List1.cs | 2 +- .../GetAzVMwareProvisionedNetwork_Get.cs | 2 +- ...VMwareProvisionedNetwork_GetViaIdentity.cs | 2 +- ...ionedNetwork_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareProvisionedNetwork_List.cs | 2 +- .../GetAzVMwarePureStoragePolicy_Get.cs | 2 +- ...zVMwarePureStoragePolicy_GetViaIdentity.cs | 2 +- ...toragePolicy_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwarePureStoragePolicy_List.cs | 2 +- .../cmdlets/GetAzVMwareScriptCmdlet_Get.cs | 2 +- .../GetAzVMwareScriptCmdlet_GetViaIdentity.cs | 2 +- ...ScriptCmdlet_GetViaIdentityPrivateCloud.cs | 2 +- ...criptCmdlet_GetViaIdentityScriptPackage.cs | 2 +- .../cmdlets/GetAzVMwareScriptCmdlet_List.cs | 2 +- .../GetAzVMwareScriptExecutionLog_Get.cs | 2 +- ...VMwareScriptExecutionLog_GetViaIdentity.cs | 2 +- ...ExecutionLog_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareScriptExecution_Get.cs | 2 +- ...tAzVMwareScriptExecution_GetViaIdentity.cs | 2 +- ...iptExecution_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareScriptExecution_List.cs | 2 +- .../cmdlets/GetAzVMwareScriptPackage_Get.cs | 2 +- ...GetAzVMwareScriptPackage_GetViaIdentity.cs | 2 +- ...criptPackage_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareScriptPackage_List.cs | 2 +- .../generated/cmdlets/GetAzVMwareSku_List.cs | 2 +- .../cmdlets/GetAzVMwareVirtualMachine_Get.cs | 2 +- ...etAzVMwareVirtualMachine_GetViaIdentity.cs | 2 +- ...areVirtualMachine_GetViaIdentityCluster.cs | 2 +- ...rtualMachine_GetViaIdentityPrivateCloud.cs | 2 +- .../cmdlets/GetAzVMwareVirtualMachine_List.cs | 2 +- .../GetAzVMwareWorkloadNetworkDhcp_Get.cs | 2 +- ...MwareWorkloadNetworkDhcp_GetViaIdentity.cs | 2 +- ...orkDhcp_GetViaIdentityDhcpConfiguration.cs | 2 +- .../GetAzVMwareWorkloadNetworkDhcp_List.cs | 2 +- ...etAzVMwareWorkloadNetworkDnsService_Get.cs | 2 +- ...orkloadNetworkDnsService_GetViaIdentity.cs | 2 +- ...rkDnsService_GetViaIdentityPrivateCloud.cs | 2 +- ...tAzVMwareWorkloadNetworkDnsService_List.cs | 2 +- .../GetAzVMwareWorkloadNetworkDnsZone_Get.cs | 2 +- ...reWorkloadNetworkDnsZone_GetViaIdentity.cs | 2 +- ...tworkDnsZone_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareWorkloadNetworkDnsZone_List.cs | 2 +- .../GetAzVMwareWorkloadNetworkGateway_Get.cs | 2 +- ...reWorkloadNetworkGateway_GetViaIdentity.cs | 2 +- ...tworkGateway_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareWorkloadNetworkGateway_List.cs | 2 +- ...zVMwareWorkloadNetworkPortMirroring_Get.cs | 2 +- ...loadNetworkPortMirroring_GetViaIdentity.cs | 2 +- ...ortMirroring_GetViaIdentityPrivateCloud.cs | 2 +- ...VMwareWorkloadNetworkPortMirroring_List.cs | 2 +- .../GetAzVMwareWorkloadNetworkPublicIP_Get.cs | 2 +- ...eWorkloadNetworkPublicIP_GetViaIdentity.cs | 2 +- ...workPublicIP_GetViaIdentityPrivateCloud.cs | 2 +- ...GetAzVMwareWorkloadNetworkPublicIP_List.cs | 2 +- .../GetAzVMwareWorkloadNetworkSegment_Get.cs | 2 +- ...reWorkloadNetworkSegment_GetViaIdentity.cs | 2 +- ...tworkSegment_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareWorkloadNetworkSegment_List.cs | 2 +- .../GetAzVMwareWorkloadNetworkVMGroup_Get.cs | 2 +- ...reWorkloadNetworkVMGroup_GetViaIdentity.cs | 2 +- ...tworkVMGroup_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareWorkloadNetworkVMGroup_List.cs | 2 +- .../GetAzVMwareWorkloadNetworkVM_Get.cs | 2 +- ...zVMwareWorkloadNetworkVM_GetViaIdentity.cs | 2 +- ...oadNetworkVM_GetViaIdentityPrivateCloud.cs | 2 +- .../GetAzVMwareWorkloadNetworkVM_List.cs | 2 +- .../cmdlets/GetAzVMwareWorkloadNetwork_Get.cs | 2 +- ...tAzVMwareWorkloadNetwork_GetViaIdentity.cs | 2 +- .../GetAzVMwareWorkloadNetwork_List.cs | 2 +- ...VMwareInitiateMaintenanceCheck_Initiate.cs | 521 ++ ...ateMaintenanceCheck_InitiateViaIdentity.cs | 492 ++ ...ceCheck_InitiateViaIdentityPrivateCloud.cs | 504 ++ ...zVMwareRescheduleMaintenance_Reschedule.cs | 535 ++ ...escheduleMaintenance_RescheduleExpanded.cs | 546 ++ ...heduleMaintenance_RescheduleViaIdentity.cs | 506 ++ ...intenance_RescheduleViaIdentityExpanded.cs | 518 ++ ...nance_RescheduleViaIdentityPrivateCloud.cs | 518 ++ ...scheduleViaIdentityPrivateCloudExpanded.cs | 529 ++ ...okeAzVMwareScheduleMaintenance_Schedule.cs | 535 ++ ...areScheduleMaintenance_ScheduleExpanded.cs | 546 ++ ...ScheduleMaintenance_ScheduleViaIdentity.cs | 506 ++ ...Maintenance_ScheduleViaIdentityExpanded.cs | 518 ++ ...tenance_ScheduleViaIdentityPrivateCloud.cs | 518 ++ ...ScheduleViaIdentityPrivateCloudExpanded.cs | 529 ++ ...VirtualMachineMovement_RestrictExpanded.cs | 18 +- ...ment_RestrictViaIdentityClusterExpanded.cs | 18 +- ...ineMovement_RestrictViaIdentityExpanded.cs | 18 +- ...RestrictViaIdentityPrivateCloudExpanded.cs | 18 +- .../NewAzVMwareAddon_CreateExpanded.cs | 35 +- ...AzVMwareAddon_CreateViaIdentityExpanded.cs | 35 +- ...n_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...NewAzVMwareAuthorization_CreateExpanded.cs | 35 +- ...Authorization_CreateViaIdentityExpanded.cs | 35 +- ...n_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- .../NewAzVMwareCloudLink_CreateExpanded.cs | 35 +- ...wareCloudLink_CreateViaIdentityExpanded.cs | 35 +- ...k_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- .../NewAzVMwareCluster_CreateExpanded.cs | 35 +- ...VMwareCluster_CreateViaIdentityExpanded.cs | 35 +- ...r_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- .../NewAzVMwareDatastore_CreateExpanded.cs | 35 +- ...astore_CreateViaIdentityClusterExpanded.cs | 35 +- ...wareDatastore_CreateViaIdentityExpanded.cs | 35 +- ...e_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...areGlobalReachConnection_CreateExpanded.cs | 35 +- ...achConnection_CreateViaIdentityExpanded.cs | 35 +- ...n_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- .../NewAzVMwareIscsiPath_CreateExpanded.cs | 35 +- ...wareIscsiPath_CreateViaIdentityExpanded.cs | 35 +- .../NewAzVMwareLicense_CreateExpanded.cs | 562 ++ ...VMwareLicense_CreateViaIdentityExpanded.cs | 540 ++ ...wAzVMwarePlacementPolicy_CreateExpanded.cs | 35 +- ...Policy_CreateViaIdentityClusterExpanded.cs | 35 +- ...acementPolicy_CreateViaIdentityExpanded.cs | 35 +- ...y_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...AzVMwarePrivateCloudNsxtPassword_Rotate.cs | 20 +- ...vateCloudNsxtPassword_RotateViaIdentity.cs | 20 +- ...MwarePrivateCloudVcenterPassword_Rotate.cs | 20 +- ...eCloudVcenterPassword_RotateViaIdentity.cs | 20 +- .../NewAzVMwarePrivateCloud_CreateExpanded.cs | 35 +- ...zVMwarePureStoragePolicy_CreateExpanded.cs | 35 +- ...StoragePolicy_CreateViaIdentityExpanded.cs | 35 +- ...y_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...wAzVMwareScriptExecution_CreateExpanded.cs | 35 +- ...riptExecution_CreateViaIdentityExpanded.cs | 35 +- ...n_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...MwareWorkloadNetworkDhcp_CreateExpanded.cs | 35 +- ...adNetworkDhcp_CreateViaIdentityExpanded.cs | 35 +- ...p_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...orkloadNetworkDnsService_CreateExpanded.cs | 35 +- ...orkDnsService_CreateViaIdentityExpanded.cs | 35 +- ...e_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...reWorkloadNetworkDnsZone_CreateExpanded.cs | 35 +- ...etworkDnsZone_CreateViaIdentityExpanded.cs | 35 +- ...e_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...loadNetworkPortMirroring_CreateExpanded.cs | 35 +- ...PortMirroring_CreateViaIdentityExpanded.cs | 35 +- ...g_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...eWorkloadNetworkPublicIP_CreateExpanded.cs | 35 +- ...tworkPublicIP_CreateViaIdentityExpanded.cs | 35 +- ...P_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...reWorkloadNetworkSegment_CreateExpanded.cs | 35 +- ...etworkSegment_CreateViaIdentityExpanded.cs | 35 +- ...t_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- ...reWorkloadNetworkVMGroup_CreateExpanded.cs | 35 +- ...etworkVMGroup_CreateViaIdentityExpanded.cs | 35 +- ...p_CreateViaIdentityPrivateCloudExpanded.cs | 35 +- .../cmdlets/RemoveAzVMwareAddon_Delete.cs | 20 +- .../RemoveAzVMwareAddon_DeleteViaIdentity.cs | 20 +- ...wareAddon_DeleteViaIdentityPrivateCloud.cs | 20 +- .../RemoveAzVMwareAuthorization_Delete.cs | 20 +- ...AzVMwareAuthorization_DeleteViaIdentity.cs | 20 +- ...orization_DeleteViaIdentityPrivateCloud.cs | 20 +- .../cmdlets/RemoveAzVMwareCloudLink_Delete.cs | 20 +- ...moveAzVMwareCloudLink_DeleteViaIdentity.cs | 20 +- ...CloudLink_DeleteViaIdentityPrivateCloud.cs | 20 +- .../cmdlets/RemoveAzVMwareCluster_Delete.cs | 20 +- ...RemoveAzVMwareCluster_DeleteViaIdentity.cs | 20 +- ...reCluster_DeleteViaIdentityPrivateCloud.cs | 20 +- .../cmdlets/RemoveAzVMwareDatastore_Delete.cs | 20 +- ...moveAzVMwareDatastore_DeleteViaIdentity.cs | 20 +- ...MwareDatastore_DeleteViaIdentityCluster.cs | 20 +- ...Datastore_DeleteViaIdentityPrivateCloud.cs | 20 +- ...oveAzVMwareGlobalReachConnection_Delete.cs | 20 +- ...GlobalReachConnection_DeleteViaIdentity.cs | 20 +- ...onnection_DeleteViaIdentityPrivateCloud.cs | 20 +- .../cmdlets/RemoveAzVMwareIscsiPath_Delete.cs | 20 +- ...moveAzVMwareIscsiPath_DeleteViaIdentity.cs | 20 +- .../cmdlets/RemoveAzVMwareLicense_Delete.cs | 596 ++ ...RemoveAzVMwareLicense_DeleteViaIdentity.cs | 574 ++ .../RemoveAzVMwarePlacementPolicy_Delete.cs | 20 +- ...VMwarePlacementPolicy_DeleteViaIdentity.cs | 20 +- ...lacementPolicy_DeleteViaIdentityCluster.cs | 20 +- ...entPolicy_DeleteViaIdentityPrivateCloud.cs | 20 +- .../RemoveAzVMwarePrivateCloud_Delete.cs | 20 +- ...eAzVMwarePrivateCloud_DeleteViaIdentity.cs | 20 +- .../RemoveAzVMwarePureStoragePolicy_Delete.cs | 20 +- ...warePureStoragePolicy_DeleteViaIdentity.cs | 20 +- ...agePolicy_DeleteViaIdentityPrivateCloud.cs | 20 +- .../RemoveAzVMwareScriptExecution_Delete.cs | 20 +- ...VMwareScriptExecution_DeleteViaIdentity.cs | 20 +- ...Execution_DeleteViaIdentityPrivateCloud.cs | 20 +- ...emoveAzVMwareWorkloadNetworkDhcp_Delete.cs | 20 +- ...reWorkloadNetworkDhcp_DeleteViaIdentity.cs | 20 +- ...tworkDhcp_DeleteViaIdentityPrivateCloud.cs | 20 +- ...zVMwareWorkloadNetworkDnsService_Delete.cs | 20 +- ...loadNetworkDnsService_DeleteViaIdentity.cs | 20 +- ...kDnsService_DeleteViaIdentityDnsService.cs | 20 +- ...veAzVMwareWorkloadNetworkDnsZone_Delete.cs | 20 +- ...orkloadNetworkDnsZone_DeleteViaIdentity.cs | 20 +- ...NetworkDnsZone_DeleteViaIdentityDnsZone.cs | 20 +- ...wareWorkloadNetworkPortMirroring_Delete.cs | 20 +- ...dNetworkPortMirroring_DeleteViaIdentity.cs | 20 +- ...g_DeleteViaIdentityPortMirroringProfile.cs | 20 +- ...eAzVMwareWorkloadNetworkPublicIP_Delete.cs | 20 +- ...rkloadNetworkPublicIP_DeleteViaIdentity.cs | 20 +- ...tworkPublicIP_DeleteViaIdentityPublicIP.cs | 20 +- ...veAzVMwareWorkloadNetworkSegment_Delete.cs | 20 +- ...orkloadNetworkSegment_DeleteViaIdentity.cs | 20 +- ...rkSegment_DeleteViaIdentityPrivateCloud.cs | 20 +- ...veAzVMwareWorkloadNetworkVMGroup_Delete.cs | 20 +- ...orkloadNetworkVMGroup_DeleteViaIdentity.cs | 20 +- ...NetworkVMGroup_DeleteViaIdentityVMGroup.cs | 20 +- ...AzVMwareLocationQuotaAvailability_Check.cs | 2 +- ...LocationTrialAvailability_CheckExpanded.cs | 2 +- ...MwareServiceComponentAvailability_Check.cs | 562 ++ ...eComponentAvailability_CheckViaIdentity.cs | 542 ++ ...ntAvailability_CheckViaIdentityLocation.cs | 555 ++ ...ateAzVMwareAuthorization_UpdateExpanded.cs | 33 +- ...Authorization_UpdateViaIdentityExpanded.cs | 33 +- ...n_UpdateViaIdentityPrivateCloudExpanded.cs | 33 +- .../UpdateAzVMwareCloudLink_UpdateExpanded.cs | 33 +- ...wareCloudLink_UpdateViaIdentityExpanded.cs | 33 +- ...k_UpdateViaIdentityPrivateCloudExpanded.cs | 33 +- .../UpdateAzVMwareCluster_UpdateExpanded.cs | 35 +- ...VMwareCluster_UpdateViaIdentityExpanded.cs | 35 +- ...r_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- .../UpdateAzVMwareDatastore_UpdateExpanded.cs | 33 +- ...astore_UpdateViaIdentityClusterExpanded.cs | 33 +- ...wareDatastore_UpdateViaIdentityExpanded.cs | 33 +- ...e_UpdateViaIdentityPrivateCloudExpanded.cs | 33 +- ...areGlobalReachConnection_UpdateExpanded.cs | 33 +- ...achConnection_UpdateViaIdentityExpanded.cs | 33 +- ...n_UpdateViaIdentityPrivateCloudExpanded.cs | 33 +- .../UpdateAzVMwareIscsiPath_UpdateExpanded.cs | 33 +- ...wareIscsiPath_UpdateViaIdentityExpanded.cs | 33 +- .../UpdateAzVMwareLicense_UpdateExpanded.cs | 569 ++ ...VMwareLicense_UpdateViaIdentityExpanded.cs | 549 ++ ...eAzVMwarePlacementPolicy_UpdateExpanded.cs | 35 +- ...Policy_UpdateViaIdentityClusterExpanded.cs | 35 +- ...acementPolicy_UpdateViaIdentityExpanded.cs | 35 +- ...y_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- ...dateAzVMwarePrivateCloud_UpdateExpanded.cs | 33 +- ...ePrivateCloud_UpdateViaIdentityExpanded.cs | 33 +- ...zVMwarePureStoragePolicy_UpdateExpanded.cs | 33 +- ...StoragePolicy_UpdateViaIdentityExpanded.cs | 33 +- ...y_UpdateViaIdentityPrivateCloudExpanded.cs | 33 +- ...MwareWorkloadNetworkDhcp_UpdateExpanded.cs | 35 +- ...adNetworkDhcp_UpdateViaIdentityExpanded.cs | 35 +- ...p_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- ...orkloadNetworkDnsService_UpdateExpanded.cs | 35 +- ...orkDnsService_UpdateViaIdentityExpanded.cs | 35 +- ...e_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- ...reWorkloadNetworkDnsZone_UpdateExpanded.cs | 35 +- ...etworkDnsZone_UpdateViaIdentityExpanded.cs | 35 +- ...e_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- ...loadNetworkPortMirroring_UpdateExpanded.cs | 35 +- ...PortMirroring_UpdateViaIdentityExpanded.cs | 35 +- ...g_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- ...reWorkloadNetworkSegment_UpdateExpanded.cs | 35 +- ...etworkSegment_UpdateViaIdentityExpanded.cs | 35 +- ...t_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- ...reWorkloadNetworkVMGroup_UpdateExpanded.cs | 35 +- ...etworkVMGroup_UpdateViaIdentityExpanded.cs | 35 +- ...p_UpdateViaIdentityPrivateCloudExpanded.cs | 35 +- .../BuildTime/Models/PsProxyOutputs.cs | 5 +- .../generated/runtime/Context.cs | 2 +- .../internal/Get-AzVMwareAddon.ps1 | 6 + .../internal/Get-AzVMwareScriptCmdlet.ps1 | 9 + .../internal/Get-AzVMwareScriptExecution.ps1 | 6 + .../Get-AzVMwareScriptExecutionLog.ps1 | 6 + .../internal/Get-AzVMwareScriptPackage.ps1 | 6 + .../internal/Get-AzVMwareWorkloadNetwork.ps1 | 3 + .../Get-AzVMwareWorkloadNetworkDhcp.ps1 | 6 + .../Get-AzVMwareWorkloadNetworkDnsService.ps1 | 6 + .../Get-AzVMwareWorkloadNetworkDnsZone.ps1 | 6 + .../Get-AzVMwareWorkloadNetworkGateway.ps1 | 6 + ...t-AzVMwareWorkloadNetworkPortMirroring.ps1 | 6 + .../Get-AzVMwareWorkloadNetworkPublicIP.ps1 | 6 + .../Get-AzVMwareWorkloadNetworkSegment.ps1 | 6 + .../Get-AzVMwareWorkloadNetworkVM.ps1 | 6 + .../Get-AzVMwareWorkloadNetworkVMGroup.ps1 | 6 + .../Lock-AzVMwareVirtualMachineMovement.ps1 | 9 + .../internal/New-AzVMwareAddon.ps1 | 6 + .../internal/New-AzVMwareScriptExecution.ps1 | 6 + .../New-AzVMwareWorkloadNetworkDhcp.ps1 | 6 + .../New-AzVMwareWorkloadNetworkDnsService.ps1 | 6 + .../New-AzVMwareWorkloadNetworkDnsZone.ps1 | 6 + ...w-AzVMwareWorkloadNetworkPortMirroring.ps1 | 6 + .../New-AzVMwareWorkloadNetworkPublicIP.ps1 | 6 + .../New-AzVMwareWorkloadNetworkSegment.ps1 | 6 + .../New-AzVMwareWorkloadNetworkVMGroup.ps1 | 6 + .../internal/ProxyCmdletDefinitions.ps1 | 246 + .../internal/Remove-AzVMwareAddon.ps1 | 6 + .../internal/Remove-AzVMwarePrivateCloud.ps1 | 3 + .../Remove-AzVMwareScriptExecution.ps1 | 6 + .../Remove-AzVMwareWorkloadNetworkDhcp.ps1 | 6 + ...move-AzVMwareWorkloadNetworkDnsService.ps1 | 6 + .../Remove-AzVMwareWorkloadNetworkDnsZone.ps1 | 6 + ...e-AzVMwareWorkloadNetworkPortMirroring.ps1 | 6 + ...Remove-AzVMwareWorkloadNetworkPublicIP.ps1 | 6 + .../Remove-AzVMwareWorkloadNetworkSegment.ps1 | 6 + .../Remove-AzVMwareWorkloadNetworkVMGroup.ps1 | 6 + .../Update-AzVMwareWorkloadNetworkDhcp.ps1 | 6 + ...date-AzVMwareWorkloadNetworkDnsService.ps1 | 6 + .../Update-AzVMwareWorkloadNetworkDnsZone.ps1 | 6 + ...e-AzVMwareWorkloadNetworkPortMirroring.ps1 | 6 + .../Update-AzVMwareWorkloadNetworkSegment.ps1 | 6 + .../Update-AzVMwareWorkloadNetworkVMGroup.ps1 | 6 + 545 files changed, 50021 insertions(+), 5447 deletions(-) create mode 100644 generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicense.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicenseProperty.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Get-AzVMwareMaintenance.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudVcfLicense.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareInitiateMaintenanceCheck.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareRescheduleMaintenance.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareScheduleMaintenance.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/New-AzVMwareLicense.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Remove-AzVMwareLicense.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Test-AzVMwareServiceComponentAvailability.ps1 create mode 100644 generated/VMware/VMware.Autorest/exports/Update-AzVMwareLicense.ps1 create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Label.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Label.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Label.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Label.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/License.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/License.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/License.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/License.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.PowerShell.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.TypeConverter.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.cs create mode 100644 generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.json.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_Get.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_GetViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_Get.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_GetViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_List.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_Get.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentityPrivateCloud.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_List.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_Get.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_GetViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_Initiate.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_Reschedule.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_Schedule.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateViaIdentityExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_Delete.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_DeleteViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_Check.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentity.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateExpanded.cs create mode 100644 generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateViaIdentityExpanded.cs diff --git a/generated/VMware/VMware.Autorest/Az.VMware.format.ps1xml b/generated/VMware/VMware.Autorest/Az.VMware.format.ps1xml index 6bb8aa422390..a9af6f0af819 100644 --- a/generated/VMware/VMware.Autorest/Az.VMware.format.ps1xml +++ b/generated/VMware/VMware.Autorest/Az.VMware.format.ps1xml @@ -325,6 +325,164 @@ + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AvailableWindowForMaintenanceWhileRescheduleOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AvailableWindowForMaintenanceWhileRescheduleOperation#Multiple + + + + + + + + + + + + + + + + + + Kind + + + EndsAt + + + StartsAt + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AvailableWindowForMaintenanceWhileScheduleOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.AvailableWindowForMaintenanceWhileScheduleOperation#Multiple + + + + + + + + + + + + + + + + + + Kind + + + EndsAt + + + StartsAt + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRange + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRange#Multiple + + + + + + + + + + + + + + + + + + EndsAt + + + Reason + + + StartsAt + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedWhileRescheduleOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedWhileRescheduleOperation#Multiple + + + + + + + + + + + + + + + Kind + + + Category + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedWhileScheduleOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedWhileScheduleOperation#Multiple + + + + + + + + + + + + + + + Kind + + + Category + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Circuit @@ -1623,6 +1781,46 @@ + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResourceError + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResourceError#Multiple + + + + + + + + + + + + + + + + + + + + + ActionRequired + + + Detail + + + ErrorCode + + + Name + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IscsiPath @@ -1727,10 +1925,534 @@ - NetworkBlock + NetworkBlock + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Label + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Label#Multiple + + + + + + + + + + + + + + + Key + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseListResult + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties#Multiple + + + + + + + + + + + + + + + Kind + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheck + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheck#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceListResult + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation#Multiple + + + + + + + + + + + + Kind + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceProperties + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ClusterId + + + Component + + + DisplayName + + + EstimatedDurationInMinute + + + Impact + + + InfoLink + + + ProvisioningState + + + ScheduledByMicrosoft + + + ScheduledStartTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadiness + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadiness#Multiple + + + + + + + + + + + + + + + + + + LastUpdated + + + Message + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadinessRefreshOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadinessRefreshOperation#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + Kind + + + DisabledReason + + + IsDisabled + + + Message + + + RefreshedByMicrosoft + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReschedule + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReschedule#Multiple + + + + + + + + + + + + + + + Message + + + RescheduleTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceSchedule + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceSchedule#Multiple + + + + + + + + + + + + + + + Message + + + ScheduleTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceState + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceState#Multiple + + + + + + + + + + + + + + + + + + + + + EndedAt - ProvisioningState + Message + + + Name + + + StartedAt @@ -2677,6 +3399,62 @@ + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperation#Multiple + + + + + + + + + + + + + + + + + + Kind + + + DisabledReason + + + IsDisabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraint + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraint#Multiple + + + + + + + + + + + + Kind + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Resource @@ -2817,6 +3595,96 @@ + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperation + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperation#Multiple + + + + + + + + + + + + + + + + + + Kind + + + DisabledReason + + + IsDisabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint#Multiple + + + + + + + + + + + + Kind + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.SchedulingWindow + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.SchedulingWindow#Multiple + + + + + + + + + + + + + + + + + + Kind + + + EndsAt + + + StartsAt + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptCmdlet @@ -3635,6 +4503,86 @@ + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Vcf5License + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Vcf5License#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + Kind + + + ProvisioningState + + + BroadcomContractNumber + + + BroadcomSiteId + + + Core + + + EndDate + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense#Multiple + + + + + + + + + + + + + + + Kind + + + ProvisioningState + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VirtualMachine @@ -3881,6 +4829,58 @@ + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VmwareFirewallLicenseProperties + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VmwareFirewallLicenseProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + Kind + + + ProvisioningState + + + BroadcomContractNumber + + + BroadcomSiteId + + + Core + + + EndDate + + + + + + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VMwareIdentity @@ -3924,9 +4924,15 @@ + + + + + + @@ -3957,6 +4963,9 @@ + + + @@ -4009,9 +5018,15 @@ HostId + + LicenseName + Location + + MaintenanceName + PlacementPolicyName @@ -4042,6 +5057,9 @@ SegmentId + + ServiceComponentName + StoragePolicyName diff --git a/generated/VMware/VMware.Autorest/Az.VMware.psd1 b/generated/VMware/VMware.Autorest/Az.VMware.psd1 index 620d2bbd9410..f18c485dcd90 100644 --- a/generated/VMware/VMware.Autorest/Az.VMware.psd1 +++ b/generated/VMware/VMware.Autorest/Az.VMware.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.VMware.private.dll' FormatsToProcess = './Az.VMware.format.ps1xml' - FunctionsToExport = 'Get-AzVMwareAddon', 'Get-AzVMwareAuthorization', 'Get-AzVMwareCloudLink', 'Get-AzVMwareCluster', 'Get-AzVMwareClusterZone', 'Get-AzVMwareDatastore', 'Get-AzVMwareGlobalReachConnection', 'Get-AzVMwareHost', 'Get-AzVMwareIscsiPath', 'Get-AzVMwarePlacementPolicy', 'Get-AzVMwarePrivateCloud', 'Get-AzVMwarePrivateCloudAdminCredential', 'Get-AzVMwareProvisionedNetwork', 'Get-AzVMwarePureStoragePolicy', 'Get-AzVMwareSku', 'Get-AzVMwareVirtualMachine', 'New-AzVMwareAddon', 'New-AzVMwareAddonSrmPropertyObject', 'New-AzVMwareAddonVrPropertyObject', 'New-AzVMwareAuthorization', 'New-AzVMwareCloudLink', 'New-AzVMwareCluster', 'New-AzVMwareDatastore', 'New-AzVMwareGlobalReachConnection', 'New-AzVMwareIscsiPath', 'New-AzVMwarePlacementPolicy', 'New-AzVMwarePrivateCloud', 'New-AzVMwarePrivateCloudNsxtPassword', 'New-AzVMwarePrivateCloudVcenterPassword', 'New-AzVMwarePSCredentialExecutionParameterObject', 'New-AzVMwarePureStoragePolicy', 'New-AzVMwareScriptSecureStringExecutionParameterObject', 'New-AzVMwareScriptStringExecutionParameterObject', 'New-AzVMwareVmHostPlacementPolicyPropertyObject', 'New-AzVMwareVMPlacementPolicyPropertyObject', 'Remove-AzVMwareAddon', 'Remove-AzVMwareAuthorization', 'Remove-AzVMwareCloudLink', 'Remove-AzVMwareCluster', 'Remove-AzVMwareDatastore', 'Remove-AzVMwareGlobalReachConnection', 'Remove-AzVMwareIscsiPath', 'Remove-AzVMwarePlacementPolicy', 'Remove-AzVMwarePrivateCloud', 'Remove-AzVMwarePureStoragePolicy', 'Test-AzVMwareLocationQuotaAvailability', 'Test-AzVMwareLocationTrialAvailability', 'Update-AzVMwareAuthorization', 'Update-AzVMwareCloudLink', 'Update-AzVMwareCluster', 'Update-AzVMwareDatastore', 'Update-AzVMwareGlobalReachConnection', 'Update-AzVMwareIscsiPath', 'Update-AzVMwarePlacementPolicy', 'Update-AzVMwarePrivateCloud', 'Update-AzVMwarePureStoragePolicy' + FunctionsToExport = 'Get-AzVMwareAddon', 'Get-AzVMwareAuthorization', 'Get-AzVMwareCloudLink', 'Get-AzVMwareCluster', 'Get-AzVMwareClusterZone', 'Get-AzVMwareDatastore', 'Get-AzVMwareGlobalReachConnection', 'Get-AzVMwareHost', 'Get-AzVMwareIscsiPath', 'Get-AzVMwareLicense', 'Get-AzVMwareLicenseProperty', 'Get-AzVMwareMaintenance', 'Get-AzVMwarePlacementPolicy', 'Get-AzVMwarePrivateCloud', 'Get-AzVMwarePrivateCloudAdminCredential', 'Get-AzVMwarePrivateCloudVcfLicense', 'Get-AzVMwareProvisionedNetwork', 'Get-AzVMwarePureStoragePolicy', 'Get-AzVMwareSku', 'Get-AzVMwareVirtualMachine', 'Invoke-AzVMwareInitiateMaintenanceCheck', 'Invoke-AzVMwareRescheduleMaintenance', 'Invoke-AzVMwareScheduleMaintenance', 'New-AzVMwareAddon', 'New-AzVMwareAddonSrmPropertyObject', 'New-AzVMwareAddonVrPropertyObject', 'New-AzVMwareAuthorization', 'New-AzVMwareCloudLink', 'New-AzVMwareCluster', 'New-AzVMwareDatastore', 'New-AzVMwareGlobalReachConnection', 'New-AzVMwareIscsiPath', 'New-AzVMwareLicense', 'New-AzVMwarePlacementPolicy', 'New-AzVMwarePrivateCloud', 'New-AzVMwarePrivateCloudNsxtPassword', 'New-AzVMwarePrivateCloudVcenterPassword', 'New-AzVMwarePSCredentialExecutionParameterObject', 'New-AzVMwarePureStoragePolicy', 'New-AzVMwareScriptSecureStringExecutionParameterObject', 'New-AzVMwareScriptStringExecutionParameterObject', 'New-AzVMwareVmHostPlacementPolicyPropertyObject', 'New-AzVMwareVMPlacementPolicyPropertyObject', 'Remove-AzVMwareAddon', 'Remove-AzVMwareAuthorization', 'Remove-AzVMwareCloudLink', 'Remove-AzVMwareCluster', 'Remove-AzVMwareDatastore', 'Remove-AzVMwareGlobalReachConnection', 'Remove-AzVMwareIscsiPath', 'Remove-AzVMwareLicense', 'Remove-AzVMwarePlacementPolicy', 'Remove-AzVMwarePrivateCloud', 'Remove-AzVMwarePureStoragePolicy', 'Test-AzVMwareLocationQuotaAvailability', 'Test-AzVMwareLocationTrialAvailability', 'Test-AzVMwareServiceComponentAvailability', 'Update-AzVMwareAuthorization', 'Update-AzVMwareCloudLink', 'Update-AzVMwareCluster', 'Update-AzVMwareDatastore', 'Update-AzVMwareGlobalReachConnection', 'Update-AzVMwareIscsiPath', 'Update-AzVMwareLicense', 'Update-AzVMwarePlacementPolicy', 'Update-AzVMwarePrivateCloud', 'Update-AzVMwarePureStoragePolicy' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'VMware' diff --git a/generated/VMware/VMware.Autorest/Properties/AssemblyInfo.cs b/generated/VMware/VMware.Autorest/Properties/AssemblyInfo.cs index da07cbac2ae6..fcef0ac799b4 100644 --- a/generated/VMware/VMware.Autorest/Properties/AssemblyInfo.cs +++ b/generated/VMware/VMware.Autorest/Properties/AssemblyInfo.cs @@ -20,7 +20,9 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - VMware")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("0.7.2")] -[assembly: System.Reflection.AssemblyVersionAttribute("0.7.2")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.8.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.8.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] -[assembly: System.CLSCompliantAttribute(false)] \ No newline at end of file +[assembly: System.CLSCompliantAttribute(false)] + + diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAddon.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAddon.ps1 index 7499d0569ba1..1e1dfc6d14fb 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAddon.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAddon.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -167,8 +170,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAuthorization.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAuthorization.ps1 index e037ba867585..682214923d92 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAuthorization.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareAuthorization.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -205,8 +211,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCloudLink.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCloudLink.ps1 index cbb7d1305444..54318bca8632 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCloudLink.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCloudLink.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -205,8 +211,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCluster.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCluster.ps1 index ae2ff4783088..a381a56e2391 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCluster.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareCluster.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -205,8 +211,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareClusterZone.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareClusterZone.ps1 index db39db6f114b..438a436d8de3 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareClusterZone.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareClusterZone.ps1 @@ -120,8 +120,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareDatastore.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareDatastore.ps1 index 4c6de31f53a9..6c259a7da26d 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareDatastore.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareDatastore.ps1 @@ -47,7 +47,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -250,8 +259,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareGlobalReachConnection.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareGlobalReachConnection.ps1 index 23a9efebaf9a..ae79cc3d8cf1 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareGlobalReachConnection.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareGlobalReachConnection.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -205,8 +211,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareHost.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareHost.ps1 index c45b6a1606f1..da847169877f 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareHost.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareHost.ps1 @@ -47,7 +47,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -250,8 +259,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareIscsiPath.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareIscsiPath.ps1 index 5b9159bf4736..287d981b75be 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareIscsiPath.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareIscsiPath.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -159,8 +162,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicense.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicense.ps1 new file mode 100644 index 000000000000..28b43465b6b1 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicense.ps1 @@ -0,0 +1,248 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a License +.Description +Get a License +.Example +Get-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarelicense +#> +function Get-AzVMwareLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwareLicense_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareLicense_GetViaIdentity'; + List = 'Az.VMware.private\Get-AzVMwareLicense_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicenseProperty.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicenseProperty.ps1 new file mode 100644 index 000000000000..01f99624f117 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareLicenseProperty.ps1 @@ -0,0 +1,244 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Just like ArmResourceActionSync, but with no request body. +.Description +Just like ArmResourceActionSync, but with no request body. +.Example +Get-AzVMwareLicenseProperty -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarelicenseproperty +#> +function Get-AzVMwareLicenseProperty { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwareLicenseProperty_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareLicenseProperty_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Get-AzVMwareMaintenance.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareMaintenance.ps1 new file mode 100644 index 000000000000..013c0adbab99 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareMaintenance.ps1 @@ -0,0 +1,328 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a Maintenance +.Description +Get a Maintenance +.Example +Get-AzVMwareMaintenance -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Example +Get-AzVMwareMaintenance -Name maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwaremaintenance +#> +function Get-AzVMwareMaintenance { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] + [Alias('MaintenanceName')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the maintenance + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.DateTime] + # date from which result should be returned. + # ie. + # scheduledStartTime >= from + ${From}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.String] + # Filter maintenances based on state + ${StateName}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Active", "Inactive")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.String] + # Filter active or inactive maintenances + ${Status}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.DateTime] + # date till which result should be returned. + # i.e. + # scheduledStartTime <= to + ${To}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwareMaintenance_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareMaintenance_GetViaIdentity'; + GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareMaintenance_GetViaIdentityPrivateCloud'; + List = 'Az.VMware.private\Get-AzVMwareMaintenance_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePlacementPolicy.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePlacementPolicy.ps1 index 8ceb48efccd6..d85995e9f615 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePlacementPolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePlacementPolicy.ps1 @@ -47,7 +47,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -250,8 +259,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloud.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloud.ps1 index e9b086714e09..6deb25cf322f 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloud.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloud.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -164,8 +167,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudAdminCredential.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudAdminCredential.ps1 index 785376145192..b2e76bb5ff27 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudAdminCredential.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudAdminCredential.ps1 @@ -114,8 +114,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudVcfLicense.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudVcfLicense.ps1 new file mode 100644 index 000000000000..bcd5008b59ee --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePrivateCloudVcfLicense.ps1 @@ -0,0 +1,244 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get the license for the private cloud +.Description +Get the license for the private cloud +.Example +Get-AzVMwarePrivateCloudVcfLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloudvcflicense +#> +function Get-AzVMwarePrivateCloudVcfLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwarePrivateCloudVcfLicense_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePrivateCloudVcfLicense_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Get-AzVMwareProvisionedNetwork.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareProvisionedNetwork.ps1 index a8c389e4f9df..bb4ed4b0072e 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareProvisionedNetwork.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareProvisionedNetwork.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -205,8 +211,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePureStoragePolicy.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePureStoragePolicy.ps1 index 3ea148be398b..6cc66b8dd8db 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePureStoragePolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwarePureStoragePolicy.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -204,8 +210,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareSku.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareSku.ps1 index 90d69ff3ae64..0c36fca0ace2 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareSku.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareSku.ps1 @@ -101,8 +101,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareVirtualMachine.ps1 b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareVirtualMachine.ps1 index 198b903b79a2..e4ae449e4fd0 100644 --- a/generated/VMware/VMware.Autorest/exports/Get-AzVMwareVirtualMachine.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Get-AzVMwareVirtualMachine.ps1 @@ -47,7 +47,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -250,8 +259,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareInitiateMaintenanceCheck.ps1 b/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareInitiateMaintenanceCheck.ps1 new file mode 100644 index 000000000000..04c13ca431fc --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareInitiateMaintenanceCheck.ps1 @@ -0,0 +1,291 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Initiate maintenance readiness checks +.Description +Initiate maintenance readiness checks +.Example +Invoke-AzVMwareInitiateMaintenanceCheck -MaintenanceName maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/invoke-azvmwareinitiatemaintenancecheck +#> +function Invoke-AzVMwareInitiateMaintenanceCheck { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] +[CmdletBinding(DefaultParameterSetName='Initiate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Initiate', Mandatory)] + [Parameter(ParameterSetName='InitiateViaIdentityPrivateCloud', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the maintenance + ${MaintenanceName}, + + [Parameter(ParameterSetName='Initiate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Initiate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Initiate')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='InitiateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='InitiateViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.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 = @{ + Initiate = 'Az.VMware.private\Invoke-AzVMwareInitiateMaintenanceCheck_Initiate'; + InitiateViaIdentity = 'Az.VMware.private\Invoke-AzVMwareInitiateMaintenanceCheck_InitiateViaIdentity'; + InitiateViaIdentityPrivateCloud = 'Az.VMware.private\Invoke-AzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud'; + } + if (('Initiate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareRescheduleMaintenance.ps1 b/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareRescheduleMaintenance.ps1 new file mode 100644 index 000000000000..b6747d292061 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareRescheduleMaintenance.ps1 @@ -0,0 +1,331 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Reschedule a maintenance +.Description +Reschedule a maintenance +.Example +Invoke-AzVMwareRescheduleMaintenance -MaintenanceName maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance +.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. + +BODY : reschedule a maintenance + [Message ]: rescheduling reason + [RescheduleTime ]: reschedule time + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/invoke-azvmwarereschedulemaintenance +#> +function Invoke-AzVMwareRescheduleMaintenance { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] +[CmdletBinding(DefaultParameterSetName='RescheduleExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Reschedule', Mandatory)] + [Parameter(ParameterSetName='RescheduleExpanded', Mandatory)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloud', Mandatory)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the maintenance + ${MaintenanceName}, + + [Parameter(ParameterSetName='Reschedule', Mandatory)] + [Parameter(ParameterSetName='RescheduleExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Reschedule', Mandatory)] + [Parameter(ParameterSetName='RescheduleExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Reschedule')] + [Parameter(ParameterSetName='RescheduleExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RescheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter(ParameterSetName='Reschedule', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule] + # reschedule a maintenance + ${Body}, + + [Parameter(ParameterSetName='RescheduleExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.String] + # rescheduling reason + ${Message}, + + [Parameter(ParameterSetName='RescheduleExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.DateTime] + # reschedule time + ${RescheduleTime}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.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 = @{ + Reschedule = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_Reschedule'; + RescheduleExpanded = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleExpanded'; + RescheduleViaIdentity = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentity'; + RescheduleViaIdentityExpanded = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded'; + RescheduleViaIdentityPrivateCloud = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud'; + RescheduleViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded'; + } + if (('Reschedule', 'RescheduleExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareScheduleMaintenance.ps1 b/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareScheduleMaintenance.ps1 new file mode 100644 index 000000000000..f3c30666c6c9 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Invoke-AzVMwareScheduleMaintenance.ps1 @@ -0,0 +1,331 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Schedule a maintenance +.Description +Schedule a maintenance +.Example +Invoke-AzVMwareScheduleMaintenance -MaintenanceName maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance +.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. + +BODY : schedule a maintenance + [Message ]: scheduling message + [ScheduleTime ]: schedule time + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/invoke-azvmwareschedulemaintenance +#> +function Invoke-AzVMwareScheduleMaintenance { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] +[CmdletBinding(DefaultParameterSetName='ScheduleExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Schedule', Mandatory)] + [Parameter(ParameterSetName='ScheduleExpanded', Mandatory)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloud', Mandatory)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the maintenance + ${MaintenanceName}, + + [Parameter(ParameterSetName='Schedule', Mandatory)] + [Parameter(ParameterSetName='ScheduleExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Schedule', Mandatory)] + [Parameter(ParameterSetName='ScheduleExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Schedule')] + [Parameter(ParameterSetName='ScheduleExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ScheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter(ParameterSetName='Schedule', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule] + # schedule a maintenance + ${Body}, + + [Parameter(ParameterSetName='ScheduleExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.String] + # scheduling message + ${Message}, + + [Parameter(ParameterSetName='ScheduleExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.DateTime] + # schedule time + ${ScheduleTime}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.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 = @{ + Schedule = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_Schedule'; + ScheduleExpanded = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleExpanded'; + ScheduleViaIdentity = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentity'; + ScheduleViaIdentityExpanded = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded'; + ScheduleViaIdentityPrivateCloud = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud'; + ScheduleViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded'; + } + if (('Schedule', 'ScheduleExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/New-AzVMwareAddon.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareAddon.ps1 index 56c81489e4b0..f3c0b2a56644 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwareAddon.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareAddon.ps1 @@ -139,8 +139,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwareAuthorization.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareAuthorization.ps1 index 58641e3012a0..df19713517a4 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwareAuthorization.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareAuthorization.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -218,8 +224,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwareCloudLink.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareCloudLink.ps1 index 2548832f5c64..9cae0159a772 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwareCloudLink.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareCloudLink.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -218,8 +224,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwareCluster.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareCluster.ps1 index 6525ed514664..5a0002bb3932 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwareCluster.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareCluster.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -267,8 +273,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwareDatastore.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareDatastore.ps1 index aa9c45a73529..3939c5ad065a 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwareDatastore.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareDatastore.ps1 @@ -45,7 +45,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -105,7 +111,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -116,6 +124,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -299,8 +308,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwareGlobalReachConnection.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareGlobalReachConnection.ps1 index 359cb2f81128..904993b32d55 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwareGlobalReachConnection.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareGlobalReachConnection.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -230,8 +236,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwareIscsiPath.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareIscsiPath.ps1 index 52eda62da948..a77df2f1f9af 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwareIscsiPath.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareIscsiPath.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -174,8 +177,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwareLicense.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwareLicense.ps1 new file mode 100644 index 000000000000..b6cc350a840b --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwareLicense.ps1 @@ -0,0 +1,256 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a License +.Description +Create a License +.Example +New-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwarelicense +#> +function New-AzVMwareLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.VMware.private\New-AzVMwareLicense_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareLicense_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/New-AzVMwarePlacementPolicy.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePlacementPolicy.ps1 index 96c278f43b97..a15b34dc5d87 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePlacementPolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePlacementPolicy.ps1 @@ -49,7 +49,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -109,7 +115,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -120,6 +128,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -271,8 +280,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloud.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloud.ps1 index cb45a56630e7..f749188c2e94 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloud.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloud.ps1 @@ -278,8 +278,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudNsxtPassword.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudNsxtPassword.ps1 index 65fce6ebd1b8..273ff40efeb4 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudNsxtPassword.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudNsxtPassword.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -174,8 +177,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudVcenterPassword.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudVcenterPassword.ps1 index 997305be8dbe..114cb1821788 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudVcenterPassword.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePrivateCloudVcenterPassword.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -174,8 +177,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePureStoragePolicy.ps1 b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePureStoragePolicy.ps1 index d5bfe45d5619..06985b22c8a7 100644 --- a/generated/VMware/VMware.Autorest/exports/New-AzVMwarePureStoragePolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/New-AzVMwarePureStoragePolicy.ps1 @@ -20,7 +20,7 @@ Create a PureStoragePolicy .Description Create a PureStoragePolicy .Example -New-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -StoragePolicyName azps_test_policy +New-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -StoragePolicyName storagePolicy1 -StoragePolicyDefinition storagePolicyDefinition1 -StoragePoolId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/PureStorage.Block/storagePools/storagePool1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -223,8 +229,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/VMware/VMware.Autorest/exports/ProxyCmdletDefinitions.ps1 index 61fa6bbf64e4..7c9772926967 100644 --- a/generated/VMware/VMware.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/VMware/VMware.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -205,8 +211,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -325,7 +330,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -336,6 +343,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -355,7 +363,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -366,6 +376,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -483,8 +494,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -676,8 +686,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -793,7 +802,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -804,6 +815,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -823,7 +835,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -834,6 +848,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -951,8 +966,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1071,7 +1085,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1082,6 +1098,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1101,7 +1118,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1112,6 +1131,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1131,7 +1151,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1142,6 +1164,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1274,8 +1297,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1395,7 +1417,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1406,6 +1430,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1425,7 +1450,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1436,6 +1463,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1553,8 +1581,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1673,7 +1700,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1684,6 +1713,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1703,7 +1733,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1714,6 +1746,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1733,7 +1766,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1744,6 +1779,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1876,8 +1912,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1995,7 +2030,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2006,6 +2043,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2109,8 +2147,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2197,53 +2234,21 @@ end { <# .Synopsis -Get a PlacementPolicy +Just like ArmResourceActionSync, but with no request body. .Description -Get a PlacementPolicy -.Example -Get-AzVMwarePlacementPolicy -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 +Just like ArmResourceActionSync, but with no request body. .Example -Get-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 +Get-AzVMwareLicenseProperty -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties .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. -CLUSTERINPUTOBJECT : Identity Parameter - [AddonName ]: Name of the addon. - [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization - [CloudLinkName ]: Name of the cloud link. - [ClusterName ]: Name of the cluster - [DatastoreName ]: Name of the datastore - [DhcpId ]: The ID of the DHCP configuration - [DnsServiceId ]: ID of the DNS service. - [DnsZoneId ]: ID of the DNS zone. - [GatewayId ]: The ID of the NSX Gateway - [GlobalReachConnectionName ]: Name of the global reach connection - [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site - [HostId ]: The host identifier. - [Id ]: Resource identity path - [Location ]: The name of the Azure region. - [PlacementPolicyName ]: Name of the placement policy. - [PortMirroringId ]: ID of the NSX port mirroring profile. - [PrivateCloudName ]: Name of the private cloud - [ProvisionedNetworkName ]: Name of the cloud link. - [PublicIPId ]: ID of the DNS zone. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScriptCmdletName ]: Name of the script cmdlet. - [ScriptExecutionName ]: Name of the script cmdlet. - [ScriptPackageName ]: Name of the script package. - [SegmentId ]: The ID of the NSX Segment - [StoragePolicyName ]: Name of the storage policy. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [VMGroupId ]: ID of the VM group. - [VirtualMachineId ]: ID of the virtual machine. - INPUTOBJECT : Identity Parameter [AddonName ]: Name of the addon. [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization @@ -2258,7 +2263,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2269,73 +2276,25 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment - [StoragePolicyName ]: Name of the storage policy. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [VMGroupId ]: ID of the VM group. - [VirtualMachineId ]: ID of the virtual machine. - -PRIVATECLOUDINPUTOBJECT : Identity Parameter - [AddonName ]: Name of the addon. - [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization - [CloudLinkName ]: Name of the cloud link. - [ClusterName ]: Name of the cluster - [DatastoreName ]: Name of the datastore - [DhcpId ]: The ID of the DHCP configuration - [DnsServiceId ]: ID of the DNS service. - [DnsZoneId ]: ID of the DNS zone. - [GatewayId ]: The ID of the NSX Gateway - [GlobalReachConnectionName ]: Name of the global reach connection - [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site - [HostId ]: The host identifier. - [Id ]: Resource identity path - [Location ]: The name of the Azure region. - [PlacementPolicyName ]: Name of the placement policy. - [PortMirroringId ]: ID of the NSX port mirroring profile. - [PrivateCloudName ]: Name of the private cloud - [ProvisionedNetworkName ]: Name of the cloud link. - [PublicIPId ]: ID of the DNS zone. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScriptCmdletName ]: Name of the script cmdlet. - [ScriptExecutionName ]: Name of the script cmdlet. - [ScriptPackageName ]: Name of the script package. - [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareplacementpolicy +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarelicenseproperty #> -function Get-AzVMwarePlacementPolicy { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzVMwareLicenseProperty { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] - [System.String] - # Name of the cluster - ${ClusterName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] - [Alias('PlacementPolicyName')] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] - [System.String] - # Name of the placement policy. - ${Name}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. @@ -2343,7 +2302,6 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -2357,18 +2315,6 @@ param( # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] - # Identity Parameter - ${ClusterInputObject}, - - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] - # Identity Parameter - ${PrivateCloudInputObject}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2431,8 +2377,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2453,13 +2398,10 @@ begin { } $mapping = @{ - Get = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_Get'; - GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentity'; - GetViaIdentityCluster = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentityCluster'; - GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentityPrivateCloud'; - List = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_List'; + Get = 'Az.VMware.private\Get-AzVMwareLicenseProperty_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareLicenseProperty_GetViaIdentity'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2521,35 +2463,77 @@ end { <# .Synopsis -List the admin credentials for the private cloud +Get a License .Description -List the admin credentials for the private cloud +Get a License .Example -Get-AzVMwarePrivateCloudAdminCredential -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +Get-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAdminCredentials +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloudadmincredential +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarelicense #> -function Get-AzVMwarePrivateCloudAdminCredential { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAdminCredentials])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzVMwareLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -2557,6 +2541,12 @@ param( # The value must be an UUID. ${SubscriptionId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2619,8 +2609,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2641,9 +2630,11 @@ begin { } $mapping = @{ - List = 'Az.VMware.private\Get-AzVMwarePrivateCloudAdminCredential_List'; + Get = 'Az.VMware.private\Get-AzVMwareLicense_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareLicense_GetViaIdentity'; + List = 'Az.VMware.private\Get-AzVMwareLicense_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2705,20 +2696,18 @@ end { <# .Synopsis -Get a PrivateCloud +Get a Maintenance .Description -Get a PrivateCloud -.Example -Get-AzVMwarePrivateCloud +Get a Maintenance .Example -Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group +Get-AzVMwareMaintenance -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example -Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group -Name azps_test_cloud +Get-AzVMwareMaintenance -Name maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance .Notes COMPLEX PARAMETER PROPERTIES @@ -2738,7 +2727,42 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2749,26 +2773,35 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloud +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwaremaintenance #> -function Get-AzVMwarePrivateCloud { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud])] +function Get-AzVMwareMaintenance { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('PrivateCloudName')] + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] + [Alias('MaintenanceName')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] - # Name of the private cloud + # Name of the maintenance ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. @@ -2777,7 +2810,6 @@ param( [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -2791,6 +2823,42 @@ param( # Identity Parameter ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.DateTime] + # date from which result should be returned. + # ie. + # scheduledStartTime >= from + ${From}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.String] + # Filter maintenances based on state + ${StateName}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Active", "Inactive")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.String] + # Filter active or inactive maintenances + ${Status}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Query')] + [System.DateTime] + # date till which result should be returned. + # i.e. + # scheduledStartTime <= to + ${To}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2853,8 +2921,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2875,12 +2942,12 @@ begin { } $mapping = @{ - Get = 'Az.VMware.private\Get-AzVMwarePrivateCloud_Get'; - GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePrivateCloud_GetViaIdentity'; - List = 'Az.VMware.private\Get-AzVMwarePrivateCloud_List'; - List1 = 'Az.VMware.private\Get-AzVMwarePrivateCloud_List1'; + Get = 'Az.VMware.private\Get-AzVMwareMaintenance_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareMaintenance_GetViaIdentity'; + GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareMaintenance_GetViaIdentityPrivateCloud'; + List = 'Az.VMware.private\Get-AzVMwareMaintenance_List'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2942,23 +3009,1774 @@ end { <# .Synopsis -Get a ProvisionedNetwork +Get a PlacementPolicy .Description -Get a ProvisionedNetwork +Get a PlacementPolicy .Example -Get-AzVMwareProvisionedNetwork -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +Get-AzVMwarePlacementPolicy -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 .Example -Get-AzVMwareProvisionedNetwork -Name vsan -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +Get-AzVMwarePlacementPolicy -ClusterName cluster1 -Name policy1 -PrivateCloudName cloud1 -ResourceGroupName group1 .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy .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. +CLUSTERINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareplacementpolicy +#> +function Get-AzVMwarePlacementPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the cluster + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] + [Alias('PlacementPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the placement policy. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${ClusterInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentity'; + GetViaIdentityCluster = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentityCluster'; + GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_GetViaIdentityPrivateCloud'; + List = 'Az.VMware.private\Get-AzVMwarePlacementPolicy_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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 +List the admin credentials for the private cloud +.Description +List the admin credentials for the private cloud +.Example +Get-AzVMwarePrivateCloudAdminCredential -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAdminCredentials +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloudadmincredential +#> +function Get-AzVMwarePrivateCloudAdminCredential { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAdminCredentials])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.VMware.private\Get-AzVMwarePrivateCloudAdminCredential_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get the license for the private cloud +.Description +Get the license for the private cloud +.Example +Get-AzVMwarePrivateCloudVcfLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloudvcflicense +#> +function Get-AzVMwarePrivateCloudVcfLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwarePrivateCloudVcfLicense_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePrivateCloudVcfLicense_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a PrivateCloud +.Description +Get a PrivateCloud +.Example +Get-AzVMwarePrivateCloud +.Example +Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group +.Example +Get-AzVMwarePrivateCloud -ResourceGroupName azps_test_group -Name azps_test_cloud + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprivatecloud +#> +function Get-AzVMwarePrivateCloud { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('PrivateCloudName')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwarePrivateCloud_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePrivateCloud_GetViaIdentity'; + List = 'Az.VMware.private\Get-AzVMwarePrivateCloud_List'; + List1 = 'Az.VMware.private\Get-AzVMwarePrivateCloud_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a ProvisionedNetwork +.Description +Get a ProvisionedNetwork +.Example +Get-AzVMwareProvisionedNetwork -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Example +Get-AzVMwareProvisionedNetwork -Name vsan -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprovisionednetwork +#> +function Get-AzVMwareProvisionedNetwork { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] + [Alias('ProvisionedNetworkName')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the cloud link. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_GetViaIdentity'; + GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_GetViaIdentityPrivateCloud'; + List = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a PureStoragePolicy +.Description +Get a PureStoragePolicy +.Example +Get-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Example +Get-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -StoragePolicyName azps_test_policy + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarepurestoragepolicy +#> +function Get-AzVMwarePureStoragePolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the storage policy. + ${StoragePolicyName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_GetViaIdentity'; + GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_GetViaIdentityPrivateCloud'; + List = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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 +A list of SKUs. +.Description +A list of SKUs. +.Example +Get-AzVMwareSku + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceSku +.Link +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwaresku +#> +function Get-AzVMwareSku { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceSku])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.VMware.private\Get-AzVMwareSku_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a VirtualMachine +.Description +Get a VirtualMachine +.Example +Get-AzVMwareVirtualMachine -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 +.Example +Get-AzVMwareVirtualMachine -Id vm-209 -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine +.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. + +CLUSTERINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + INPUTOBJECT : Identity Parameter [AddonName ]: Name of the addon. [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization @@ -2973,7 +4791,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2984,6 +4804,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3003,7 +4824,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3014,24 +4837,34 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwareprovisionednetwork +https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarevirtualmachine #> -function Get-AzVMwareProvisionedNetwork { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork])] +function Get-AzVMwareVirtualMachine { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] - [Alias('ProvisionedNetworkName')] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] - # Name of the cloud link. - ${Name}, + # Name of the cluster + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] + [Alias('VirtualMachineId')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # ID of the virtual machine. + ${Id}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -3063,6 +4896,12 @@ param( # Identity Parameter ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${ClusterInputObject}, + [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] @@ -3131,8 +4970,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3153,10 +4991,11 @@ begin { } $mapping = @{ - Get = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_Get'; - GetViaIdentity = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_GetViaIdentity'; - GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_GetViaIdentityPrivateCloud'; - List = 'Az.VMware.private\Get-AzVMwareProvisionedNetwork_List'; + Get = 'Az.VMware.private\Get-AzVMwareVirtualMachine_Get'; + GetViaIdentity = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentity'; + GetViaIdentityCluster = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentityCluster'; + GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentityPrivateCloud'; + List = 'Az.VMware.private\Get-AzVMwareVirtualMachine_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -3220,18 +5059,16 @@ end { <# .Synopsis -Get a PureStoragePolicy +Initiate maintenance readiness checks .Description -Get a PureStoragePolicy -.Example -Get-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +Initiate maintenance readiness checks .Example -Get-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -StoragePolicyName azps_test_policy +Invoke-AzVMwareInitiateMaintenanceCheck -MaintenanceName maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance .Notes COMPLEX PARAMETER PROPERTIES @@ -3251,7 +5088,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3262,6 +5101,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3281,7 +5121,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3292,55 +5134,53 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarepurestoragepolicy +https://learn.microsoft.com/powershell/module/az.vmware/invoke-azvmwareinitiatemaintenancecheck #> -function Get-AzVMwarePureStoragePolicy { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Invoke-AzVMwareInitiateMaintenanceCheck { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] +[CmdletBinding(DefaultParameterSetName='Initiate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Initiate', Mandatory)] + [Parameter(ParameterSetName='InitiateViaIdentityPrivateCloud', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the maintenance + ${MaintenanceName}, + + [Parameter(ParameterSetName='Initiate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Initiate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] - [System.String] - # Name of the storage policy. - ${StoragePolicyName}, - - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Initiate')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] + [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='InitiateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='InitiateViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter @@ -3408,8 +5248,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3430,12 +5269,11 @@ begin { } $mapping = @{ - Get = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_Get'; - GetViaIdentity = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_GetViaIdentity'; - GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_GetViaIdentityPrivateCloud'; - List = 'Az.VMware.private\Get-AzVMwarePureStoragePolicy_List'; + Initiate = 'Az.VMware.private\Invoke-AzVMwareInitiateMaintenanceCheck_Initiate'; + InitiateViaIdentity = 'Az.VMware.private\Invoke-AzVMwareInitiateMaintenanceCheck_InitiateViaIdentity'; + InitiateViaIdentityPrivateCloud = 'Az.VMware.private\Invoke-AzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Initiate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3497,29 +5335,170 @@ end { <# .Synopsis -A list of SKUs. +Reschedule a maintenance .Description -A list of SKUs. +Reschedule a maintenance .Example -Get-AzVMwareSku +Invoke-AzVMwareRescheduleMaintenance -MaintenanceName maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceSku +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance +.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. + +BODY : reschedule a maintenance + [Message ]: rescheduling reason + [RescheduleTime ]: reschedule time + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +PRIVATECLOUDINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwaresku +https://learn.microsoft.com/powershell/module/az.vmware/invoke-azvmwarereschedulemaintenance #> -function Get-AzVMwareSku { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceSku])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Invoke-AzVMwareRescheduleMaintenance { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] +[CmdletBinding(DefaultParameterSetName='RescheduleExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter()] + [Parameter(ParameterSetName='Reschedule', Mandatory)] + [Parameter(ParameterSetName='RescheduleExpanded', Mandatory)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloud', Mandatory)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the maintenance + ${MaintenanceName}, + + [Parameter(ParameterSetName='Reschedule', Mandatory)] + [Parameter(ParameterSetName='RescheduleExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Reschedule', Mandatory)] + [Parameter(ParameterSetName='RescheduleExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Reschedule')] + [Parameter(ParameterSetName='RescheduleExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] + [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, + [Parameter(ParameterSetName='RescheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter(ParameterSetName='Reschedule', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule] + # reschedule a maintenance + ${Body}, + + [Parameter(ParameterSetName='RescheduleExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.String] + # rescheduling reason + ${Message}, + + [Parameter(ParameterSetName='RescheduleExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='RescheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.DateTime] + # reschedule time + ${RescheduleTime}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3582,8 +5561,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3604,9 +5582,14 @@ begin { } $mapping = @{ - List = 'Az.VMware.private\Get-AzVMwareSku_List'; - } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + Reschedule = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_Reschedule'; + RescheduleExpanded = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleExpanded'; + RescheduleViaIdentity = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentity'; + RescheduleViaIdentityExpanded = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded'; + RescheduleViaIdentityPrivateCloud = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud'; + RescheduleViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Invoke-AzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded'; + } + if (('Reschedule', 'RescheduleExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3668,52 +5651,26 @@ end { <# .Synopsis -Get a VirtualMachine +Schedule a maintenance .Description -Get a VirtualMachine -.Example -Get-AzVMwareVirtualMachine -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 +Schedule a maintenance .Example -Get-AzVMwareVirtualMachine -Id vm-209 -ClusterName cluster1 -PrivateCloudName cloud1 -ResourceGroupName group1 +Invoke-AzVMwareScheduleMaintenance -MaintenanceName maintenance1 -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance .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. -CLUSTERINPUTOBJECT : Identity Parameter - [AddonName ]: Name of the addon. - [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization - [CloudLinkName ]: Name of the cloud link. - [ClusterName ]: Name of the cluster - [DatastoreName ]: Name of the datastore - [DhcpId ]: The ID of the DHCP configuration - [DnsServiceId ]: ID of the DNS service. - [DnsZoneId ]: ID of the DNS zone. - [GatewayId ]: The ID of the NSX Gateway - [GlobalReachConnectionName ]: Name of the global reach connection - [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site - [HostId ]: The host identifier. - [Id ]: Resource identity path - [Location ]: The name of the Azure region. - [PlacementPolicyName ]: Name of the placement policy. - [PortMirroringId ]: ID of the NSX port mirroring profile. - [PrivateCloudName ]: Name of the private cloud - [ProvisionedNetworkName ]: Name of the cloud link. - [PublicIPId ]: ID of the DNS zone. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScriptCmdletName ]: Name of the script cmdlet. - [ScriptExecutionName ]: Name of the script cmdlet. - [ScriptPackageName ]: Name of the script package. - [SegmentId ]: The ID of the NSX Segment - [StoragePolicyName ]: Name of the storage policy. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [VMGroupId ]: ID of the VM group. - [VirtualMachineId ]: ID of the virtual machine. +BODY : schedule a maintenance + [Message ]: scheduling message + [ScheduleTime ]: schedule time INPUTOBJECT : Identity Parameter [AddonName ]: Name of the addon. @@ -3729,7 +5686,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3740,6 +5699,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3759,7 +5719,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3770,76 +5732,89 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/get-azvmwarevirtualmachine +https://learn.microsoft.com/powershell/module/az.vmware/invoke-azvmwareschedulemaintenance #> -function Get-AzVMwareVirtualMachine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Invoke-AzVMwareScheduleMaintenance { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance])] +[CmdletBinding(DefaultParameterSetName='ScheduleExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] - [System.String] - # Name of the cluster - ${ClusterName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory)] - [Alias('VirtualMachineId')] + [Parameter(ParameterSetName='Schedule', Mandatory)] + [Parameter(ParameterSetName='ScheduleExpanded', Mandatory)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloud', Mandatory)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] - # ID of the virtual machine. - ${Id}, + # Name of the maintenance + ${MaintenanceName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Schedule', Mandatory)] + [Parameter(ParameterSetName='ScheduleExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # Name of the private cloud ${PrivateCloudName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Schedule', Mandatory)] + [Parameter(ParameterSetName='ScheduleExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Schedule')] + [Parameter(ParameterSetName='ScheduleExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] + [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='GetViaIdentityCluster', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter - ${ClusterInputObject}, + ${InputObject}, - [Parameter(ParameterSetName='GetViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter ${PrivateCloudInputObject}, + [Parameter(ParameterSetName='Schedule', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule] + # schedule a maintenance + ${Body}, + + [Parameter(ParameterSetName='ScheduleExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.String] + # scheduling message + ${Message}, + + [Parameter(ParameterSetName='ScheduleExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityExpanded')] + [Parameter(ParameterSetName='ScheduleViaIdentityPrivateCloudExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.DateTime] + # schedule time + ${ScheduleTime}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3902,8 +5877,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3924,13 +5898,14 @@ begin { } $mapping = @{ - Get = 'Az.VMware.private\Get-AzVMwareVirtualMachine_Get'; - GetViaIdentity = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentity'; - GetViaIdentityCluster = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentityCluster'; - GetViaIdentityPrivateCloud = 'Az.VMware.private\Get-AzVMwareVirtualMachine_GetViaIdentityPrivateCloud'; - List = 'Az.VMware.private\Get-AzVMwareVirtualMachine_List'; - } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + Schedule = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_Schedule'; + ScheduleExpanded = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleExpanded'; + ScheduleViaIdentity = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentity'; + ScheduleViaIdentityExpanded = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded'; + ScheduleViaIdentityPrivateCloud = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud'; + ScheduleViaIdentityPrivateCloudExpanded = 'Az.VMware.private\Invoke-AzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded'; + } + if (('Schedule', 'ScheduleExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4021,7 +5996,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4032,6 +6009,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4051,7 +6029,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4062,6 +6042,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4194,8 +6175,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4311,7 +6291,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4322,6 +6304,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4341,7 +6324,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4352,6 +6337,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4484,8 +6470,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4601,7 +6586,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4612,6 +6599,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4631,7 +6619,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4642,6 +6632,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4823,8 +6814,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4940,7 +6930,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4951,6 +6943,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4970,7 +6963,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4981,6 +6976,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5000,7 +6996,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5011,6 +7009,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5194,8 +7193,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5312,7 +7310,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5323,6 +7323,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5342,7 +7343,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5353,6 +7356,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5497,8 +7501,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5614,7 +7617,256 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareiscsipath +#> +function New-AzVMwareIscsiPath { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.String] + # CIDR Block for iSCSI path. + ${NetworkBlock}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.VMware.private\New-AzVMwareIscsiPath_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareIscsiPath_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a License +.Description +Create a License +.Example +New-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5625,15 +7877,16 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwareiscsipath +https://learn.microsoft.com/powershell/module/az.vmware/new-azvmwarelicense #> -function New-AzVMwareIscsiPath { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath])] +function New-AzVMwareLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -5663,12 +7916,6 @@ param( # Identity Parameter ${InputObject}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] - [System.String] - # CIDR Block for iSCSI path. - ${NetworkBlock}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5743,8 +7990,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -5765,8 +8011,8 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.VMware.private\New-AzVMwareIscsiPath_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareIscsiPath_CreateViaIdentityExpanded'; + CreateExpanded = 'Az.VMware.private\New-AzVMwareLicense_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.VMware.private\New-AzVMwareLicense_CreateViaIdentityExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -5863,7 +8109,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5874,6 +8122,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5893,7 +8142,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5904,6 +8155,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5923,7 +8175,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5934,6 +8188,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6085,8 +8340,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6203,7 +8457,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6214,6 +8470,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6332,8 +8589,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6448,7 +8704,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6459,6 +8717,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6577,8 +8836,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6668,7 +8926,7 @@ Create a PureStoragePolicy .Description Create a PureStoragePolicy .Example -New-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -StoragePolicyName azps_test_policy +New-AzVMwarePureStoragePolicy -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group -StoragePolicyName storagePolicy1 -StoragePolicyDefinition storagePolicyDefinition1 -StoragePoolId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/PureStorage.Block/storagePools/storagePool1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity @@ -6693,7 +8951,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6704,6 +8964,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6723,7 +8984,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6734,6 +8997,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6871,8 +9135,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -6992,7 +9255,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7003,6 +9268,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7022,7 +9288,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7033,6 +9301,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7165,8 +9434,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7286,7 +9554,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7297,6 +9567,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7316,7 +9587,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7327,6 +9600,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7459,8 +9733,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7580,7 +9853,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7591,6 +9866,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7610,7 +9886,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7621,6 +9899,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7753,8 +10032,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -7872,7 +10150,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7883,6 +10163,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7902,7 +10183,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7913,6 +10196,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7932,7 +10216,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7943,6 +10229,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8089,8 +10376,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8211,7 +10497,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8222,6 +10510,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8241,7 +10530,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8252,6 +10543,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8298,11 +10590,261 @@ param( # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityPrivateCloud', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${PrivateCloudInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_Delete'; + DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_DeleteViaIdentity'; + DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a IscsiPath +.Description +Delete a IscsiPath +.Example +Remove-AzVMwareIscsiPath -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Example +Get-AzVMwareIscsiPath -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareIscsiPath + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwareiscsipath +#> +function Remove-AzVMwareIscsiPath { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] # Identity Parameter - ${PrivateCloudInputObject}, + ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -8384,8 +10926,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8406,9 +10947,8 @@ begin { } $mapping = @{ - Delete = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_Delete'; - DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_DeleteViaIdentity'; - DeleteViaIdentityPrivateCloud = 'Az.VMware.private\Remove-AzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud'; + Delete = 'Az.VMware.private\Remove-AzVMwareIscsiPath_Delete'; + DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareIscsiPath_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -8472,13 +11012,13 @@ end { <# .Synopsis -Delete a IscsiPath +Delete a License .Description -Delete a IscsiPath +Delete a License .Example -Remove-AzVMwareIscsiPath -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +Remove-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group .Example -Get-AzVMwareIscsiPath -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareIscsiPath +Get-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareLicense .Inputs Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity @@ -8503,7 +11043,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8514,14 +11056,15 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. [VirtualMachineId ]: ID of the virtual machine. .Link -https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwareiscsipath +https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwarelicense #> -function Remove-AzVMwareIscsiPath { +function Remove-AzVMwareLicense { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( @@ -8632,8 +11175,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -8654,8 +11196,8 @@ begin { } $mapping = @{ - Delete = 'Az.VMware.private\Remove-AzVMwareIscsiPath_Delete'; - DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareIscsiPath_DeleteViaIdentity'; + Delete = 'Az.VMware.private\Remove-AzVMwareLicense_Delete'; + DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareLicense_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -8752,7 +11294,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8763,6 +11307,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8782,7 +11327,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8793,6 +11340,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8812,7 +11360,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8823,6 +11373,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8969,8 +11520,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9087,7 +11637,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9098,6 +11650,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9117,7 +11670,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9128,6 +11683,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9259,8 +11815,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9438,8 +11993,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9651,8 +12205,292 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.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 = @{ + CheckExpanded = 'Az.VMware.private\Test-AzVMwareLocationTrialAvailability_CheckExpanded'; + } + if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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 +Return service component availability +.Description +Return service component availability +.Example +Test-AzVMwareServiceComponentAvailability -Location westcentralus -ServiceComponentName all + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +LOCATIONINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/test-azvmwareservicecomponentavailability +#> +function Test-AzVMwareServiceComponentAvailability { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Check', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Check', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Check', Mandatory)] + [Parameter(ParameterSetName='CheckViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # A service component + ${ServiceComponentName}, + + [Parameter(ParameterSetName='Check')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CheckViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -9673,9 +12511,11 @@ begin { } $mapping = @{ - CheckExpanded = 'Az.VMware.private\Test-AzVMwareLocationTrialAvailability_CheckExpanded'; + Check = 'Az.VMware.private\Test-AzVMwareServiceComponentAvailability_Check'; + CheckViaIdentity = 'Az.VMware.private\Test-AzVMwareServiceComponentAvailability_CheckViaIdentity'; + CheckViaIdentityLocation = 'Az.VMware.private\Test-AzVMwareServiceComponentAvailability_CheckViaIdentityLocation'; } - if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Check') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -9766,7 +12606,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9777,6 +12619,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9796,7 +12639,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9807,6 +12652,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9939,8 +12785,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -10056,7 +12901,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10067,6 +12914,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10086,7 +12934,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10097,6 +12947,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10229,8 +13080,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -10348,7 +13198,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10359,6 +13211,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10378,7 +13231,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10389,6 +13244,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10564,8 +13420,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -10681,7 +13536,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10692,6 +13549,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10711,7 +13569,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10722,6 +13582,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10741,7 +13602,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10752,6 +13615,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10935,8 +13799,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -11053,7 +13916,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -11064,6 +13929,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -11083,7 +13949,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -11094,6 +13962,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -11238,8 +14107,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -11355,7 +14223,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -11366,6 +14236,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -11478,8 +14349,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -11563,6 +14433,247 @@ end { } } +<# +.Synopsis +Update a License +.Description +Update a License +.Example +Update-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwarelicense +#> +function Update-AzVMwareLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.VMware.private\Update-AzVMwareLicense_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwareLicense_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + <# .Synopsis Update a PlacementPolicy @@ -11596,7 +14707,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -11607,6 +14720,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -11626,7 +14740,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -11637,6 +14753,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -11656,7 +14773,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -11667,6 +14786,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -11842,8 +14962,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -11974,7 +15093,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -11985,6 +15106,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -12247,8 +15369,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -12363,7 +15484,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -12374,6 +15497,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -12393,7 +15517,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -12404,6 +15530,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -12541,8 +15668,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -12660,7 +15786,9 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -12671,6 +15799,7 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -12780,8 +15909,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -12991,8 +16119,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -13555,8 +16682,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -14300,7 +17426,9 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -14311,6 +17439,7 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -14435,8 +17564,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -14555,7 +17683,9 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -14566,6 +17696,7 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -14684,8 +17815,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAddon.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAddon.ps1 index 8f0a9b675506..63169b85dbec 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAddon.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAddon.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -184,8 +187,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAuthorization.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAuthorization.ps1 index 38c4a7e01afb..4402ed819aa5 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAuthorization.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareAuthorization.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -222,8 +228,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCloudLink.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCloudLink.ps1 index 45dfdab9ac03..cf7dc87e3ecd 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCloudLink.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCloudLink.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -222,8 +228,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCluster.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCluster.ps1 index e3a6f98a2987..e06c8d36796c 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCluster.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareCluster.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -222,8 +228,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareDatastore.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareDatastore.ps1 index 73a3d58211c2..b47f46df1f3c 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareDatastore.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareDatastore.ps1 @@ -47,7 +47,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -264,8 +273,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareGlobalReachConnection.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareGlobalReachConnection.ps1 index 57b545726038..45ddcf750204 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareGlobalReachConnection.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareGlobalReachConnection.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -222,8 +228,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareIscsiPath.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareIscsiPath.ps1 index e0c585eac080..63a605a8c5cf 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareIscsiPath.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareIscsiPath.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -176,8 +179,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareLicense.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareLicense.ps1 new file mode 100644 index 000000000000..2c43872d0af6 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwareLicense.ps1 @@ -0,0 +1,264 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a License +.Description +Delete a License +.Example +Remove-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group +.Example +Get-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group | Remove-AzVMwareLicense + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/remove-azvmwarelicense +#> +function Remove-AzVMwareLicense { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.VMware.private\Remove-AzVMwareLicense_Delete'; + DeleteViaIdentity = 'Az.VMware.private\Remove-AzVMwareLicense_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePlacementPolicy.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePlacementPolicy.ps1 index 8850ee14632e..97c16ec51c52 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePlacementPolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePlacementPolicy.ps1 @@ -49,7 +49,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -109,7 +115,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -120,6 +128,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -266,8 +275,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePrivateCloud.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePrivateCloud.ps1 index ad895459c282..7d445dc70fa2 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePrivateCloud.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePrivateCloud.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter To construct, see NOTES sectio [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -178,8 +181,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePureStoragePolicy.ps1 b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePureStoragePolicy.ps1 index d17ecc1134a4..578715c38563 100644 --- a/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePureStoragePolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Remove-AzVMwarePureStoragePolicy.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -217,8 +223,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationQuotaAvailability.ps1 b/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationQuotaAvailability.ps1 index 703f1ff501f7..1d187413b745 100644 --- a/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationQuotaAvailability.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationQuotaAvailability.ps1 @@ -107,8 +107,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationTrialAvailability.ps1 b/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationTrialAvailability.ps1 index 9a6d337385ae..cc8bd261ec05 100644 --- a/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationTrialAvailability.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Test-AzVMwareLocationTrialAvailability.ps1 @@ -143,8 +143,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Test-AzVMwareServiceComponentAvailability.ps1 b/generated/VMware/VMware.Autorest/exports/Test-AzVMwareServiceComponentAvailability.ps1 new file mode 100644 index 000000000000..19bd3cf5dcc5 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Test-AzVMwareServiceComponentAvailability.ps1 @@ -0,0 +1,302 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Return service component availability +.Description +Return service component availability +.Example +Test-AzVMwareServiceComponentAvailability -Location westcentralus -ServiceComponentName all + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. + +LOCATIONINPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/test-azvmwareservicecomponentavailability +#> +function Test-AzVMwareServiceComponentAvailability { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Check', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Check', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Check', Mandatory)] + [Parameter(ParameterSetName='CheckViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # A service component + ${ServiceComponentName}, + + [Parameter(ParameterSetName='Check')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CheckViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.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 = @{ + Check = 'Az.VMware.private\Test-AzVMwareServiceComponentAvailability_Check'; + CheckViaIdentity = 'Az.VMware.private\Test-AzVMwareServiceComponentAvailability_CheckViaIdentity'; + CheckViaIdentityLocation = 'Az.VMware.private\Test-AzVMwareServiceComponentAvailability_CheckViaIdentityLocation'; + } + if (('Check') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Update-AzVMwareAuthorization.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareAuthorization.ps1 index 03c86898bf11..979f59dcbf2e 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareAuthorization.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareAuthorization.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -218,8 +224,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCloudLink.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCloudLink.ps1 index 6bc5fdcd93fd..49212085777c 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCloudLink.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCloudLink.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -218,8 +224,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCluster.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCluster.ps1 index 01bb1c1f9c72..5a516b173a4a 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCluster.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareCluster.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -263,8 +269,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareDatastore.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareDatastore.ps1 index 31195d46eb43..751f43b3e5b3 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareDatastore.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareDatastore.ps1 @@ -45,7 +45,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -105,7 +111,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -116,6 +124,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -299,8 +308,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareGlobalReachConnection.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareGlobalReachConnection.ps1 index ff23c6ac89db..d15d51478fb5 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareGlobalReachConnection.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareGlobalReachConnection.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -230,8 +236,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareIscsiPath.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareIscsiPath.ps1 index 3710e93170df..ab1318f111f4 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareIscsiPath.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareIscsiPath.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -168,8 +171,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwareLicense.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareLicense.ps1 new file mode 100644 index 000000000000..2ad0ad44e6a7 --- /dev/null +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwareLicense.ps1 @@ -0,0 +1,256 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a License +.Description +Update a License +.Example +Update-AzVMwareLicense -PrivateCloudName azps_test_cloud -ResourceGroupName azps_test_group + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [AddonName ]: Name of the addon. + [AuthorizationName ]: Name of the ExpressRoute Circuit Authorization + [CloudLinkName ]: Name of the cloud link. + [ClusterName ]: Name of the cluster + [DatastoreName ]: Name of the datastore + [DhcpId ]: The ID of the DHCP configuration + [DnsServiceId ]: ID of the DNS service. + [DnsZoneId ]: ID of the DNS zone. + [GatewayId ]: The ID of the NSX Gateway + [GlobalReachConnectionName ]: Name of the global reach connection + [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site + [HostId ]: The host identifier. + [Id ]: Resource identity path + [LicenseName ]: Name of the license. + [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance + [PlacementPolicyName ]: Name of the placement policy. + [PortMirroringId ]: ID of the NSX port mirroring profile. + [PrivateCloudName ]: Name of the private cloud + [ProvisionedNetworkName ]: Name of the cloud link. + [PublicIPId ]: ID of the DNS zone. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScriptCmdletName ]: Name of the script cmdlet. + [ScriptExecutionName ]: Name of the script cmdlet. + [ScriptPackageName ]: Name of the script package. + [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component + [StoragePolicyName ]: Name of the storage policy. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [VMGroupId ]: ID of the VM group. + [VirtualMachineId ]: ID of the virtual machine. +.Link +https://learn.microsoft.com/powershell/module/az.vmware/update-azvmwarelicense +#> +function Update-AzVMwareLicense { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # Name of the private cloud + ${PrivateCloudName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." + } + + 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.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.VMware.private\Update-AzVMwareLicense_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.VMware.private\Update-AzVMwareLicense_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + 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.VMware.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.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.VMware.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) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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.VMware.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/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePlacementPolicy.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePlacementPolicy.ps1 index 313fac2f4352..483e1f5b0cae 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePlacementPolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePlacementPolicy.ps1 @@ -47,7 +47,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -293,8 +302,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePrivateCloud.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePrivateCloud.ps1 index 67f66394a723..5c3b92cc1e93 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePrivateCloud.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePrivateCloud.ps1 @@ -59,7 +59,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -70,6 +72,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -332,8 +335,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePureStoragePolicy.ps1 b/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePureStoragePolicy.ps1 index 31e558123a1f..6d37a8e6301c 100644 --- a/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePureStoragePolicy.ps1 +++ b/generated/VMware/VMware.Autorest/exports/Update-AzVMwarePureStoragePolicy.ps1 @@ -45,7 +45,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -56,6 +58,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -75,7 +78,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -86,6 +91,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -223,8 +229,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/VMware/VMware.Autorest/generate-info.json b/generated/VMware/VMware.Autorest/generate-info.json index c26392de3c87..f8bb4dad6a03 100644 --- a/generated/VMware/VMware.Autorest/generate-info.json +++ b/generated/VMware/VMware.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "b8fa384b-d0b9-4b21-abae-de0a40d5c8ac" + "generate_Id": "2726e206-da56-4c9d-8b45-65d0a875e579" } diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.PowerShell.cs new file mode 100644 index 000000000000..c7c763275659 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.PowerShell.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Time window in which Customer can reschedule maintenance + [System.ComponentModel.TypeConverter(typeof(AvailableWindowForMaintenanceWhileRescheduleOperationTypeConverter))] + public partial class AvailableWindowForMaintenanceWhileRescheduleOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AvailableWindowForMaintenanceWhileRescheduleOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind, 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 AvailableWindowForMaintenanceWhileRescheduleOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind, 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.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AvailableWindowForMaintenanceWhileRescheduleOperation(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.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AvailableWindowForMaintenanceWhileRescheduleOperation(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.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Time window in which Customer can reschedule maintenance + [System.ComponentModel.TypeConverter(typeof(AvailableWindowForMaintenanceWhileRescheduleOperationTypeConverter))] + public partial interface IAvailableWindowForMaintenanceWhileRescheduleOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.TypeConverter.cs new file mode 100644 index 000000000000..8a71481660d3 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AvailableWindowForMaintenanceWhileRescheduleOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AvailableWindowForMaintenanceWhileRescheduleOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AvailableWindowForMaintenanceWhileRescheduleOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AvailableWindowForMaintenanceWhileRescheduleOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.cs new file mode 100644 index 000000000000..15d8809e6e10 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time window in which Customer can reschedule maintenance + public partial class AvailableWindowForMaintenanceWhileRescheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint __rescheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraint(); + + /// Backing field for property. + private global::System.DateTime? _endsAt; + + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? EndsAt { get => this._endsAt; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "AvailableWindowForMaintenance"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)__rescheduleOperationConstraint).Kind = "AvailableWindowForMaintenance"; } + + /// Internal Acessors for EndsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal.EndsAt { get => this._endsAt; set { {_endsAt = value;} } } + + /// Internal Acessors for StartsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperationInternal.StartsAt { get => this._startsAt; set { {_startsAt = value;} } } + + /// Backing field for property. + private global::System.DateTime? _startsAt; + + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? StartsAt { get => this._startsAt; } + + /// + /// Creates an new instance. + /// + public AvailableWindowForMaintenanceWhileRescheduleOperation() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__rescheduleOperationConstraint), __rescheduleOperationConstraint); + await eventListener.AssertObjectIsValid(nameof(__rescheduleOperationConstraint), __rescheduleOperationConstraint); + } + } + /// Time window in which Customer can reschedule maintenance + public partial interface IAvailableWindowForMaintenanceWhileRescheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint + { + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End date Time", + SerializedName = @"endsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndsAt { get; } + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start date time", + SerializedName = @"startsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartsAt { get; } + + } + /// Time window in which Customer can reschedule maintenance + internal partial interface IAvailableWindowForMaintenanceWhileRescheduleOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal + { + /// End date Time + global::System.DateTime? EndsAt { get; set; } + /// Start date time + global::System.DateTime? StartsAt { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.json.cs new file mode 100644 index 000000000000..d6072efed77c --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileRescheduleOperation.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time window in which Customer can reschedule maintenance + public partial class AvailableWindowForMaintenanceWhileRescheduleOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal AvailableWindowForMaintenanceWhileRescheduleOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __rescheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraint(json); + {_startsAt = If( json?.PropertyT("startsAt"), out var __jsonStartsAt) ? global::System.DateTime.TryParse((string)__jsonStartsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartsAtValue) ? __jsonStartsAtValue : _startsAt : _startsAt;} + {_endsAt = If( json?.PropertyT("endsAt"), out var __jsonEndsAt) ? global::System.DateTime.TryParse((string)__jsonEndsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndsAtValue) ? __jsonEndsAtValue : _endsAt : _endsAt;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new AvailableWindowForMaintenanceWhileRescheduleOperation(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __rescheduleOperationConstraint?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._startsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._startsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startsAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._endsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._endsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endsAt" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.PowerShell.cs new file mode 100644 index 000000000000..a4accb3c38cc --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.PowerShell.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Time window in which Customer can to schedule maintenance + [System.ComponentModel.TypeConverter(typeof(AvailableWindowForMaintenanceWhileScheduleOperationTypeConverter))] + public partial class AvailableWindowForMaintenanceWhileScheduleOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AvailableWindowForMaintenanceWhileScheduleOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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 AvailableWindowForMaintenanceWhileScheduleOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AvailableWindowForMaintenanceWhileScheduleOperation(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.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AvailableWindowForMaintenanceWhileScheduleOperation(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.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Time window in which Customer can to schedule maintenance + [System.ComponentModel.TypeConverter(typeof(AvailableWindowForMaintenanceWhileScheduleOperationTypeConverter))] + public partial interface IAvailableWindowForMaintenanceWhileScheduleOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.TypeConverter.cs new file mode 100644 index 000000000000..b928ca668a37 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AvailableWindowForMaintenanceWhileScheduleOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AvailableWindowForMaintenanceWhileScheduleOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AvailableWindowForMaintenanceWhileScheduleOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AvailableWindowForMaintenanceWhileScheduleOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.cs new file mode 100644 index 000000000000..847b94582569 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time window in which Customer can to schedule maintenance + public partial class AvailableWindowForMaintenanceWhileScheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint __scheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint(); + + /// Backing field for property. + private global::System.DateTime? _endsAt; + + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? EndsAt { get => this._endsAt; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "AvailableWindowForMaintenance"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)__scheduleOperationConstraint).Kind = "AvailableWindowForMaintenance"; } + + /// Internal Acessors for EndsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal.EndsAt { get => this._endsAt; set { {_endsAt = value;} } } + + /// Internal Acessors for StartsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperationInternal.StartsAt { get => this._startsAt; set { {_startsAt = value;} } } + + /// Backing field for property. + private global::System.DateTime? _startsAt; + + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? StartsAt { get => this._startsAt; } + + /// + /// Creates an new instance. + /// + public AvailableWindowForMaintenanceWhileScheduleOperation() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__scheduleOperationConstraint), __scheduleOperationConstraint); + await eventListener.AssertObjectIsValid(nameof(__scheduleOperationConstraint), __scheduleOperationConstraint); + } + } + /// Time window in which Customer can to schedule maintenance + public partial interface IAvailableWindowForMaintenanceWhileScheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint + { + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End date Time", + SerializedName = @"endsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndsAt { get; } + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start date time", + SerializedName = @"startsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartsAt { get; } + + } + /// Time window in which Customer can to schedule maintenance + internal partial interface IAvailableWindowForMaintenanceWhileScheduleOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal + { + /// End date Time + global::System.DateTime? EndsAt { get; set; } + /// Start date time + global::System.DateTime? StartsAt { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.json.cs new file mode 100644 index 000000000000..6a8f3877fa1b --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/AvailableWindowForMaintenanceWhileScheduleOperation.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time window in which Customer can to schedule maintenance + public partial class AvailableWindowForMaintenanceWhileScheduleOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal AvailableWindowForMaintenanceWhileScheduleOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __scheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint(json); + {_startsAt = If( json?.PropertyT("startsAt"), out var __jsonStartsAt) ? global::System.DateTime.TryParse((string)__jsonStartsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartsAtValue) ? __jsonStartsAtValue : _startsAt : _startsAt;} + {_endsAt = If( json?.PropertyT("endsAt"), out var __jsonEndsAt) ? global::System.DateTime.TryParse((string)__jsonEndsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndsAtValue) ? __jsonEndsAtValue : _endsAt : _endsAt;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new AvailableWindowForMaintenanceWhileScheduleOperation(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __scheduleOperationConstraint?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._startsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._startsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startsAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._endsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._endsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endsAt" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.PowerShell.cs new file mode 100644 index 000000000000..19a2a2bb7609 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Blocked Time range Constraints for maintenance + [System.ComponentModel.TypeConverter(typeof(BlockedDatesConstraintTimeRangeTypeConverter))] + public partial class BlockedDatesConstraintTimeRange + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal BlockedDatesConstraintTimeRange(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).Reason, 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 BlockedDatesConstraintTimeRange(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal)this).Reason, 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.VMware.Models.IBlockedDatesConstraintTimeRange DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlockedDatesConstraintTimeRange(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.VMware.Models.IBlockedDatesConstraintTimeRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlockedDatesConstraintTimeRange(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.VMware.Models.IBlockedDatesConstraintTimeRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Blocked Time range Constraints for maintenance + [System.ComponentModel.TypeConverter(typeof(BlockedDatesConstraintTimeRangeTypeConverter))] + public partial interface IBlockedDatesConstraintTimeRange + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.TypeConverter.cs new file mode 100644 index 000000000000..4e8edb511305 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class BlockedDatesConstraintTimeRangeTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IBlockedDatesConstraintTimeRange ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return BlockedDatesConstraintTimeRange.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return BlockedDatesConstraintTimeRange.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return BlockedDatesConstraintTimeRange.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/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.cs new file mode 100644 index 000000000000..c02e19425133 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Blocked Time range Constraints for maintenance + public partial class BlockedDatesConstraintTimeRange : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal + { + + /// Backing field for property. + private global::System.DateTime? _endsAt; + + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? EndsAt { get => this._endsAt; } + + /// Internal Acessors for EndsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal.EndsAt { get => this._endsAt; set { {_endsAt = value;} } } + + /// Internal Acessors for Reason + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal.Reason { get => this._reason; set { {_reason = value;} } } + + /// Internal Acessors for StartsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRangeInternal.StartsAt { get => this._startsAt; set { {_startsAt = value;} } } + + /// Backing field for property. + private string _reason; + + /// Reason category for blocking maintenance reschedule + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Reason { get => this._reason; } + + /// Backing field for property. + private global::System.DateTime? _startsAt; + + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? StartsAt { get => this._startsAt; } + + /// Creates an new instance. + public BlockedDatesConstraintTimeRange() + { + + } + } + /// Blocked Time range Constraints for maintenance + public partial interface IBlockedDatesConstraintTimeRange : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End date Time", + SerializedName = @"endsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndsAt { get; } + /// Reason category for blocking maintenance reschedule + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Reason category for blocking maintenance reschedule", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; } + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start date time", + SerializedName = @"startsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartsAt { get; } + + } + /// Blocked Time range Constraints for maintenance + internal partial interface IBlockedDatesConstraintTimeRangeInternal + + { + /// End date Time + global::System.DateTime? EndsAt { get; set; } + /// Reason category for blocking maintenance reschedule + string Reason { get; set; } + /// Start date time + global::System.DateTime? StartsAt { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.json.cs new file mode 100644 index 000000000000..191d3a551694 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedDatesConstraintTimeRange.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Blocked Time range Constraints for maintenance + public partial class BlockedDatesConstraintTimeRange + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal BlockedDatesConstraintTimeRange(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_startsAt = If( json?.PropertyT("startsAt"), out var __jsonStartsAt) ? global::System.DateTime.TryParse((string)__jsonStartsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartsAtValue) ? __jsonStartsAtValue : _startsAt : _startsAt;} + {_endsAt = If( json?.PropertyT("endsAt"), out var __jsonEndsAt) ? global::System.DateTime.TryParse((string)__jsonEndsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndsAtValue) ? __jsonEndsAtValue : _endsAt : _endsAt;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)_reason;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new BlockedDatesConstraintTimeRange(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._startsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._startsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startsAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._endsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._endsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endsAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.PowerShell.cs new file mode 100644 index 000000000000..4bea55d58b74 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Time ranges blocked for rescheduling maintenance + [System.ComponentModel.TypeConverter(typeof(BlockedWhileRescheduleOperationTypeConverter))] + public partial class BlockedWhileRescheduleOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal BlockedWhileRescheduleOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Category")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).Category, global::System.Convert.ToString); + } + if (content.Contains("TimeRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).TimeRange = (System.Collections.Generic.List) content.GetValueForProperty("TimeRange",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).TimeRange, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind, 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 BlockedWhileRescheduleOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Category")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).Category, global::System.Convert.ToString); + } + if (content.Contains("TimeRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).TimeRange = (System.Collections.Generic.List) content.GetValueForProperty("TimeRange",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal)this).TimeRange, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind, 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.VMware.Models.IBlockedWhileRescheduleOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlockedWhileRescheduleOperation(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.VMware.Models.IBlockedWhileRescheduleOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlockedWhileRescheduleOperation(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.VMware.Models.IBlockedWhileRescheduleOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Time ranges blocked for rescheduling maintenance + [System.ComponentModel.TypeConverter(typeof(BlockedWhileRescheduleOperationTypeConverter))] + public partial interface IBlockedWhileRescheduleOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.TypeConverter.cs new file mode 100644 index 000000000000..2c4dabe4ff85 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class BlockedWhileRescheduleOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IBlockedWhileRescheduleOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return BlockedWhileRescheduleOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return BlockedWhileRescheduleOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return BlockedWhileRescheduleOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.cs new file mode 100644 index 000000000000..941c38e672a8 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time ranges blocked for rescheduling maintenance + public partial class BlockedWhileRescheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint __rescheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraint(); + + /// Backing field for property. + private string _category; + + /// Category of blocked date + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Category { get => this._category; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "Blocked"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)__rescheduleOperationConstraint).Kind = "Blocked"; } + + /// Internal Acessors for Category + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal.Category { get => this._category; set { {_category = value;} } } + + /// Internal Acessors for TimeRange + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperationInternal.TimeRange { get => this._timeRange; set { {_timeRange = value;} } } + + /// Backing field for property. + private System.Collections.Generic.List _timeRange; + + /// Date ranges blocked for schedule + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List TimeRange { get => this._timeRange; } + + /// Creates an new instance. + public BlockedWhileRescheduleOperation() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__rescheduleOperationConstraint), __rescheduleOperationConstraint); + await eventListener.AssertObjectIsValid(nameof(__rescheduleOperationConstraint), __rescheduleOperationConstraint); + } + } + /// Time ranges blocked for rescheduling maintenance + public partial interface IBlockedWhileRescheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint + { + /// Category of blocked date + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Category of blocked date", + SerializedName = @"category", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("HiPriorityEvent", "QuotaExhausted", "Holiday")] + string Category { get; } + /// Date ranges blocked for schedule + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Date ranges blocked for schedule", + SerializedName = @"timeRanges", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange) })] + System.Collections.Generic.List TimeRange { get; } + + } + /// Time ranges blocked for rescheduling maintenance + internal partial interface IBlockedWhileRescheduleOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal + { + /// Category of blocked date + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("HiPriorityEvent", "QuotaExhausted", "Holiday")] + string Category { get; set; } + /// Date ranges blocked for schedule + System.Collections.Generic.List TimeRange { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.json.cs new file mode 100644 index 000000000000..b6c006b170ef --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileRescheduleOperation.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time ranges blocked for rescheduling maintenance + public partial class BlockedWhileRescheduleOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal BlockedWhileRescheduleOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __rescheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraint(json); + {_category = If( json?.PropertyT("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)_category;} + {_timeRange = If( json?.PropertyT("timeRanges"), out var __jsonTimeRanges) ? If( __jsonTimeRanges as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRange.FromJson(__u) )) ))() : null : _timeRange;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new BlockedWhileRescheduleOperation(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __rescheduleOperationConstraint?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._category)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._category.ToString()) : null, "category" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._timeRange) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._timeRange ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("timeRanges",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.PowerShell.cs new file mode 100644 index 000000000000..178699a36c08 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Time ranges blocked for scheduling maintenance + [System.ComponentModel.TypeConverter(typeof(BlockedWhileScheduleOperationTypeConverter))] + public partial class BlockedWhileScheduleOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal BlockedWhileScheduleOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Category")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).Category, global::System.Convert.ToString); + } + if (content.Contains("TimeRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).TimeRange = (System.Collections.Generic.List) content.GetValueForProperty("TimeRange",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).TimeRange, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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 BlockedWhileScheduleOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Category")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).Category, global::System.Convert.ToString); + } + if (content.Contains("TimeRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).TimeRange = (System.Collections.Generic.List) content.GetValueForProperty("TimeRange",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal)this).TimeRange, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRangeTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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.VMware.Models.IBlockedWhileScheduleOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlockedWhileScheduleOperation(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.VMware.Models.IBlockedWhileScheduleOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlockedWhileScheduleOperation(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.VMware.Models.IBlockedWhileScheduleOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Time ranges blocked for scheduling maintenance + [System.ComponentModel.TypeConverter(typeof(BlockedWhileScheduleOperationTypeConverter))] + public partial interface IBlockedWhileScheduleOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.TypeConverter.cs new file mode 100644 index 000000000000..857960a7e48d --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class BlockedWhileScheduleOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IBlockedWhileScheduleOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return BlockedWhileScheduleOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return BlockedWhileScheduleOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return BlockedWhileScheduleOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.cs new file mode 100644 index 000000000000..ecc03cd04e81 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time ranges blocked for scheduling maintenance + public partial class BlockedWhileScheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint __scheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint(); + + /// Backing field for property. + private string _category; + + /// Category of blocked date + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Category { get => this._category; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "Blocked"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)__scheduleOperationConstraint).Kind = "Blocked"; } + + /// Internal Acessors for Category + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal.Category { get => this._category; set { {_category = value;} } } + + /// Internal Acessors for TimeRange + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperationInternal.TimeRange { get => this._timeRange; set { {_timeRange = value;} } } + + /// Backing field for property. + private System.Collections.Generic.List _timeRange; + + /// Date ranges blocked for schedule + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List TimeRange { get => this._timeRange; } + + /// Creates an new instance. + public BlockedWhileScheduleOperation() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__scheduleOperationConstraint), __scheduleOperationConstraint); + await eventListener.AssertObjectIsValid(nameof(__scheduleOperationConstraint), __scheduleOperationConstraint); + } + } + /// Time ranges blocked for scheduling maintenance + public partial interface IBlockedWhileScheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint + { + /// Category of blocked date + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Category of blocked date", + SerializedName = @"category", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("HiPriorityEvent", "QuotaExhausted", "Holiday")] + string Category { get; } + /// Date ranges blocked for schedule + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Date ranges blocked for schedule", + SerializedName = @"timeRanges", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange) })] + System.Collections.Generic.List TimeRange { get; } + + } + /// Time ranges blocked for scheduling maintenance + internal partial interface IBlockedWhileScheduleOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal + { + /// Category of blocked date + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("HiPriorityEvent", "QuotaExhausted", "Holiday")] + string Category { get; set; } + /// Date ranges blocked for schedule + System.Collections.Generic.List TimeRange { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.json.cs new file mode 100644 index 000000000000..13838b3bbf65 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/BlockedWhileScheduleOperation.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time ranges blocked for scheduling maintenance + public partial class BlockedWhileScheduleOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal BlockedWhileScheduleOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __scheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint(json); + {_category = If( json?.PropertyT("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)_category;} + {_timeRange = If( json?.PropertyT("timeRanges"), out var __jsonTimeRanges) ? If( __jsonTimeRanges as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedDatesConstraintTimeRange) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.BlockedDatesConstraintTimeRange.FromJson(__u) )) ))() : null : _timeRange;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new BlockedWhileScheduleOperation(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __scheduleOperationConstraint?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._category)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._category.ToString()) : null, "category" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._timeRange) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._timeRange ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("timeRanges",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.PowerShell.cs new file mode 100644 index 000000000000..82a72fff80b6 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Details about a resource impacted by a failed check + [System.ComponentModel.TypeConverter(typeof(ImpactedMaintenanceResourceTypeConverter))] + public partial class ImpactedMaintenanceResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImpactedMaintenanceResource(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.VMware.Models.IImpactedMaintenanceResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImpactedMaintenanceResource(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.VMware.Models.IImpactedMaintenanceResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImpactedMaintenanceResource(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.VMware.Models.IImpactedMaintenanceResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal)this).Error = (System.Collections.Generic.List) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal)this).Error, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResourceErrorTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImpactedMaintenanceResource(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.VMware.Models.IImpactedMaintenanceResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal)this).Error = (System.Collections.Generic.List) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal)this).Error, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResourceErrorTypeConverter.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details about a resource impacted by a failed check + [System.ComponentModel.TypeConverter(typeof(ImpactedMaintenanceResourceTypeConverter))] + public partial interface IImpactedMaintenanceResource + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.TypeConverter.cs new file mode 100644 index 000000000000..6a11d41bc768 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImpactedMaintenanceResourceTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IImpactedMaintenanceResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImpactedMaintenanceResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImpactedMaintenanceResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImpactedMaintenanceResource.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/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.cs new file mode 100644 index 000000000000..e9dec6561857 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Details about a resource impacted by a failed check + public partial class ImpactedMaintenanceResource : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _error; + + /// A list of errors associated with the impacted resource + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Error { get => this._error; } + + /// Backing field for property. + private string _id; + + /// The ID of the impacted resource + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Error + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal.Error { get => this._error; set { {_error = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Creates an new instance. + public ImpactedMaintenanceResource() + { + + } + } + /// Details about a resource impacted by a failed check + public partial interface IImpactedMaintenanceResource : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// A list of errors associated with the impacted resource + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of errors associated with the impacted resource", + SerializedName = @"errors", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError) })] + System.Collections.Generic.List Error { get; } + /// The ID of the impacted resource + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The ID of the impacted resource", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + + } + /// Details about a resource impacted by a failed check + internal partial interface IImpactedMaintenanceResourceInternal + + { + /// A list of errors associated with the impacted resource + System.Collections.Generic.List Error { get; set; } + /// The ID of the impacted resource + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.json.cs new file mode 100644 index 000000000000..079a3ac6b583 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResource.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Details about a resource impacted by a failed check + public partial class ImpactedMaintenanceResource + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new ImpactedMaintenanceResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal ImpactedMaintenanceResource(Microsoft.Azure.PowerShell.Cmdlets.VMware.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;} + {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? If( __jsonErrors as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResourceError.FromJson(__u) )) ))() : null : _error;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._error) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._error ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("errors",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.PowerShell.cs new file mode 100644 index 000000000000..5ff30d22dc92 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Details about an error affecting a resource + [System.ComponentModel.TypeConverter(typeof(ImpactedMaintenanceResourceErrorTypeConverter))] + public partial class ImpactedMaintenanceResourceError + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImpactedMaintenanceResourceError(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.VMware.Models.IImpactedMaintenanceResourceError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImpactedMaintenanceResourceError(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.VMware.Models.IImpactedMaintenanceResourceError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImpactedMaintenanceResourceError(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ErrorCode, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Detail, global::System.Convert.ToString); + } + if (content.Contains("ResolutionStep")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ResolutionStep = (System.Collections.Generic.List) content.GetValueForProperty("ResolutionStep",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ResolutionStep, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ActionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ActionRequired = (bool?) content.GetValueForProperty("ActionRequired",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ActionRequired, (__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 ImpactedMaintenanceResourceError(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ErrorCode, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Detail = (string) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).Detail, global::System.Convert.ToString); + } + if (content.Contains("ResolutionStep")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ResolutionStep = (System.Collections.Generic.List) content.GetValueForProperty("ResolutionStep",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ResolutionStep, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ActionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ActionRequired = (bool?) content.GetValueForProperty("ActionRequired",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal)this).ActionRequired, (__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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details about an error affecting a resource + [System.ComponentModel.TypeConverter(typeof(ImpactedMaintenanceResourceErrorTypeConverter))] + public partial interface IImpactedMaintenanceResourceError + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.TypeConverter.cs new file mode 100644 index 000000000000..5ce0c3c0bf8c --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImpactedMaintenanceResourceErrorTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IImpactedMaintenanceResourceError ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImpactedMaintenanceResourceError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImpactedMaintenanceResourceError.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImpactedMaintenanceResourceError.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/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.cs new file mode 100644 index 000000000000..91c5399b6b6f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Details about an error affecting a resource + public partial class ImpactedMaintenanceResourceError : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal + { + + /// Backing field for property. + private bool? _actionRequired; + + /// Indicates whether action is required by the customer + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public bool? ActionRequired { get => this._actionRequired; } + + /// Backing field for property. + private string _detail; + + /// Additional details about the error + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Detail { get => this._detail; } + + /// Backing field for property. + private string _errorCode; + + /// The error code + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string ErrorCode { get => this._errorCode; } + + /// Internal Acessors for ActionRequired + bool? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal.ActionRequired { get => this._actionRequired; set { {_actionRequired = value;} } } + + /// Internal Acessors for Detail + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for ErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal.ErrorCode { get => this._errorCode; set { {_errorCode = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for ResolutionStep + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceErrorInternal.ResolutionStep { get => this._resolutionStep; set { {_resolutionStep = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the error + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private System.Collections.Generic.List _resolutionStep; + + /// Steps to resolve the error + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List ResolutionStep { get => this._resolutionStep; } + + /// Creates an new instance. + public ImpactedMaintenanceResourceError() + { + + } + } + /// Details about an error affecting a resource + public partial interface IImpactedMaintenanceResourceError : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// Indicates whether action is required by the customer + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates whether action is required by the customer", + SerializedName = @"actionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? ActionRequired { get; } + /// Additional details about the error + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional details about the error", + SerializedName = @"details", + PossibleTypes = new [] { typeof(string) })] + string Detail { get; } + /// The error code + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(string) })] + string ErrorCode { get; } + /// The name of the error + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the error", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Steps to resolve the error + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Steps to resolve the error", + SerializedName = @"resolutionSteps", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ResolutionStep { get; } + + } + /// Details about an error affecting a resource + internal partial interface IImpactedMaintenanceResourceErrorInternal + + { + /// Indicates whether action is required by the customer + bool? ActionRequired { get; set; } + /// Additional details about the error + string Detail { get; set; } + /// The error code + string ErrorCode { get; set; } + /// The name of the error + string Name { get; set; } + /// Steps to resolve the error + System.Collections.Generic.List ResolutionStep { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.json.cs new file mode 100644 index 000000000000..51481708a5d5 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ImpactedMaintenanceResourceError.json.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Details about an error affecting a resource + public partial class ImpactedMaintenanceResourceError + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResourceError FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new ImpactedMaintenanceResourceError(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal ImpactedMaintenanceResourceError(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (string)__jsonErrorCode : (string)_errorCode;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? (string)__jsonDetails : (string)_detail;} + {_resolutionStep = If( json?.PropertyT("resolutionSteps"), out var __jsonResolutionSteps) ? If( __jsonResolutionSteps as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _resolutionStep;} + {_actionRequired = If( json?.PropertyT("actionRequired"), out var __jsonActionRequired) ? (bool?)__jsonActionRequired : _actionRequired;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._errorCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._errorCode.ToString()) : null, "errorCode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._detail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._detail.ToString()) : null, "details" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._resolutionStep) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._resolutionStep ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resolutionSteps",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._actionRequired ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonBoolean((bool)this._actionRequired) : null, "actionRequired" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Label.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Label.PowerShell.cs new file mode 100644 index 000000000000..0cd8a0154aa2 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Label.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// A key-value pair representing a label. + [System.ComponentModel.TypeConverter(typeof(LabelTypeConverter))] + public partial class Label + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Label(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.VMware.Models.ILabel DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Label(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.VMware.Models.ILabel FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Label(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Key")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Key, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Value, 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 Label(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Key")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Key, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal)this).Value, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A key-value pair representing a label. + [System.ComponentModel.TypeConverter(typeof(LabelTypeConverter))] + public partial interface ILabel + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Label.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Label.TypeConverter.cs new file mode 100644 index 000000000000..9fcfeddd0272 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Label.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LabelTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.ILabel ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Label.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Label.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Label.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/generated/VMware/VMware.Autorest/generated/api/Models/Label.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Label.cs new file mode 100644 index 000000000000..c56563f3cbda --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Label.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A key-value pair representing a label. + public partial class Label : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabelInternal + { + + /// Backing field for property. + private string _key; + + /// The key of the label. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Key { get => this._key; set => this._key = value; } + + /// Backing field for property. + private string _value; + + /// The value of the label. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public Label() + { + + } + } + /// A key-value pair representing a label. + public partial interface ILabel : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// The key of the label. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The key of the label.", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + string Key { get; set; } + /// The value of the label. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The value of the label.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// A key-value pair representing a label. + internal partial interface ILabelInternal + + { + /// The key of the label. + string Key { get; set; } + /// The value of the label. + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Label.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Label.json.cs new file mode 100644 index 000000000000..bddf291874fb --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Label.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A key-value pair representing a label. + public partial class Label + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel. + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new Label(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal Label(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)_key;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)_value;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._key)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._key.ToString()) : null, "key" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/License.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/License.PowerShell.cs new file mode 100644 index 000000000000..3b354499eda2 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/License.PowerShell.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// A license resource + [System.ComponentModel.TypeConverter(typeof(LicenseTypeConverter))] + public partial class License + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new License(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.VMware.Models.ILicense DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new License(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.VMware.Models.ILicense FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal License(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.VMware.Models.ILicenseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicensePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal License(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.VMware.Models.ILicenseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicensePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A license resource + [System.ComponentModel.TypeConverter(typeof(LicenseTypeConverter))] + public partial interface ILicense + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/License.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/License.TypeConverter.cs new file mode 100644 index 000000000000..3aad310a0bb0 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/License.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LicenseTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.ILicense ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return License.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return License.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return License.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/generated/VMware/VMware.Autorest/generated/api/Models/License.cs b/generated/VMware/VMware.Autorest/generated/api/Models/License.cs new file mode 100644 index 000000000000..f6a166dcd9e5 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/License.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A license resource + public partial class License : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Id; } + + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)Property).Kind; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal.Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)Property).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)Property).Kind = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties()); set => this._property = value; } + + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public License() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// A license resource + public partial interface ILicense : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProxyResource + { + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = true, + Update = true, + Description = @"License kind", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string Kind { get; } + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The state of the license provisioning", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + + } + /// A license resource + internal partial interface ILicenseInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProxyResourceInternal + { + /// License kind + string Kind { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties Property { get; set; } + /// The state of the license provisioning + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/License.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/License.json.cs new file mode 100644 index 000000000000..e4c6320b7d65 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/License.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A license resource + public partial class License + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense. + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new License(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal License(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.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/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.PowerShell.cs new file mode 100644 index 000000000000..e0671f72416d --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// The response of a License list operation. + [System.ComponentModel.TypeConverter(typeof(LicenseListResultTypeConverter))] + public partial class LicenseListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LicenseListResult(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.VMware.Models.ILicenseListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LicenseListResult(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.VMware.Models.ILicenseListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LicenseListResult(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.VMware.Models.ILicenseListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResultInternal)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 LicenseListResult(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.VMware.Models.ILicenseListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a License list operation. + [System.ComponentModel.TypeConverter(typeof(LicenseListResultTypeConverter))] + public partial interface ILicenseListResult + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.TypeConverter.cs new file mode 100644 index 000000000000..220038094bea --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LicenseListResultTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.ILicenseListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LicenseListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LicenseListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LicenseListResult.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/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.cs new file mode 100644 index 000000000000..5c91d25df092 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The response of a License list operation. + public partial class LicenseListResult : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The License items on this page + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public LicenseListResult() + { + + } + } + /// The response of a License list operation. + public partial interface ILicenseListResult : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The License items on this page + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The License items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a License list operation. + internal partial interface ILicenseListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The License items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.json.cs new file mode 100644 index 000000000000..8e081e452901 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseListResult.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The response of a License list operation. + public partial class LicenseListResult + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new LicenseListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal LicenseListResult(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.PowerShell.cs new file mode 100644 index 000000000000..c3f90b46e259 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// The properties of a license + [System.ComponentModel.TypeConverter(typeof(LicensePropertiesTypeConverter))] + public partial class LicenseProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LicenseProperties(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.VMware.Models.ILicenseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LicenseProperties(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.VMware.Models.ILicenseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LicenseProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LicenseProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of a license + [System.ComponentModel.TypeConverter(typeof(LicensePropertiesTypeConverter))] + public partial interface ILicenseProperties + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.TypeConverter.cs new file mode 100644 index 000000000000..a6b46c4cddf2 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LicensePropertiesTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.ILicenseProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LicenseProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LicenseProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LicenseProperties.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/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.cs new file mode 100644 index 000000000000..05cc0544914a --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The properties of a license + public partial class LicenseProperties : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal + { + + /// Backing field for property. + private string _kind= @"VmwareFirewall"; + + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Kind { get => this._kind; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal.Kind { get => this._kind; set { {_kind = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public LicenseProperties() + { + + } + } + /// The properties of a license + public partial interface ILicenseProperties : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = true, + Update = true, + Description = @"License kind", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string Kind { get; } + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The state of the license provisioning", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + + } + /// The properties of a license + internal partial interface ILicensePropertiesInternal + + { + /// License kind + string Kind { get; set; } + /// The state of the license provisioning + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.json.cs new file mode 100644 index 000000000000..fec5331529c6 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/LicenseProperties.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The properties of a license + public partial class LicenseProperties + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties interface is polymorphic, and the precise + /// model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("kind") ) + { + case "VmwareFirewall": + { + return new VmwareFirewallLicenseProperties(json); + } + } + return new LicenseProperties(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal LicenseProperties(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.PowerShell.cs new file mode 100644 index 000000000000..1d2d610475ed --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.PowerShell.cs @@ -0,0 +1,412 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// A cluster resource + [System.ComponentModel.TypeConverter(typeof(MaintenanceTypeConverter))] + public partial class Maintenance + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Maintenance(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.VMware.Models.IMaintenance DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Maintenance(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.VMware.Models.IMaintenance FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Maintenance(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.VMware.Models.IMaintenanceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenancePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Readiness")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Readiness = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness) content.GetValueForProperty("Readiness",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Readiness, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadinessTypeConverter.ConvertFrom); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceStateTypeConverter.ConvertFrom); + } + if (content.Contains("Component")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Component, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ClusterId = (int?) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ClusterId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InfoLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).InfoLink = (string) content.GetValueForProperty("InfoLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).InfoLink, global::System.Convert.ToString); + } + if (content.Contains("Impact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Impact = (string) content.GetValueForProperty("Impact",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Impact, global::System.Convert.ToString); + } + if (content.Contains("ScheduledByMicrosoft")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledByMicrosoft = (bool?) content.GetValueForProperty("ScheduledByMicrosoft",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledByMicrosoft, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledStartTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EstimatedDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).EstimatedDurationInMinute = (long?) content.GetValueForProperty("EstimatedDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).EstimatedDurationInMinute, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Operation = (System.Collections.Generic.List) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Operation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperationTypeConverter.ConvertFrom)); + } + if (content.Contains("ReadinessStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessStatus = (string) content.GetValueForProperty("ReadinessStatus",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessStatus, global::System.Convert.ToString); + } + if (content.Contains("ReadinessMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessMessage = (string) content.GetValueForProperty("ReadinessMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessMessage, global::System.Convert.ToString); + } + if (content.Contains("ReadinessFailedCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessFailedCheck = (System.Collections.Generic.List) content.GetValueForProperty("ReadinessFailedCheck",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessFailedCheck, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheckTypeConverter.ConvertFrom)); + } + if (content.Contains("ReadinessLastUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessLastUpdated = (global::System.DateTime?) content.GetValueForProperty("ReadinessLastUpdated",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessLastUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateName = (string) content.GetValueForProperty("StateName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateName, global::System.Convert.ToString); + } + if (content.Contains("StateMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateMessage = (string) content.GetValueForProperty("StateMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateMessage, global::System.Convert.ToString); + } + if (content.Contains("StateStartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateStartedAt = (global::System.DateTime?) content.GetValueForProperty("StateStartedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateStartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateEndedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateEndedAt = (global::System.DateTime?) content.GetValueForProperty("StateEndedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateEndedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ReadinessType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessType = (string) content.GetValueForProperty("ReadinessType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessType, 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 Maintenance(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.VMware.Models.IMaintenanceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenancePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Readiness")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Readiness = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness) content.GetValueForProperty("Readiness",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Readiness, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadinessTypeConverter.ConvertFrom); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceStateTypeConverter.ConvertFrom); + } + if (content.Contains("Component")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Component, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ClusterId = (int?) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ClusterId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InfoLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).InfoLink = (string) content.GetValueForProperty("InfoLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).InfoLink, global::System.Convert.ToString); + } + if (content.Contains("Impact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Impact = (string) content.GetValueForProperty("Impact",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Impact, global::System.Convert.ToString); + } + if (content.Contains("ScheduledByMicrosoft")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledByMicrosoft = (bool?) content.GetValueForProperty("ScheduledByMicrosoft",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledByMicrosoft, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledStartTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ScheduledStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EstimatedDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).EstimatedDurationInMinute = (long?) content.GetValueForProperty("EstimatedDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).EstimatedDurationInMinute, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Operation = (System.Collections.Generic.List) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).Operation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperationTypeConverter.ConvertFrom)); + } + if (content.Contains("ReadinessStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessStatus = (string) content.GetValueForProperty("ReadinessStatus",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessStatus, global::System.Convert.ToString); + } + if (content.Contains("ReadinessMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessMessage = (string) content.GetValueForProperty("ReadinessMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessMessage, global::System.Convert.ToString); + } + if (content.Contains("ReadinessFailedCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessFailedCheck = (System.Collections.Generic.List) content.GetValueForProperty("ReadinessFailedCheck",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessFailedCheck, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheckTypeConverter.ConvertFrom)); + } + if (content.Contains("ReadinessLastUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessLastUpdated = (global::System.DateTime?) content.GetValueForProperty("ReadinessLastUpdated",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessLastUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateName = (string) content.GetValueForProperty("StateName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateName, global::System.Convert.ToString); + } + if (content.Contains("StateMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateMessage = (string) content.GetValueForProperty("StateMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateMessage, global::System.Convert.ToString); + } + if (content.Contains("StateStartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateStartedAt = (global::System.DateTime?) content.GetValueForProperty("StateStartedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateStartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateEndedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateEndedAt = (global::System.DateTime?) content.GetValueForProperty("StateEndedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).StateEndedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ReadinessType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessType = (string) content.GetValueForProperty("ReadinessType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal)this).ReadinessType, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A cluster resource + [System.ComponentModel.TypeConverter(typeof(MaintenanceTypeConverter))] + public partial interface IMaintenance + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.TypeConverter.cs new file mode 100644 index 000000000000..585a9de1fa14 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenance ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Maintenance.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Maintenance.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Maintenance.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/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.cs new file mode 100644 index 000000000000..bdecfb323976 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.cs @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A cluster resource + public partial class Maintenance : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ProxyResource(); + + /// + /// Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public int? ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ClusterId; } + + /// type of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string Component { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Component; } + + /// Display name for maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).DisplayName; } + + /// Estimated time maintenance will take in minutes + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public long? EstimatedDurationInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).EstimatedDurationInMinute; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Id; } + + /// Impact on the resource during maintenance period + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string Impact { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Impact; } + + /// Link to maintenance info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string InfoLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).InfoLink; } + + /// Internal Acessors for ClusterId + int? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ClusterId = value ?? default(int); } + + /// Internal Acessors for Component + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.Component { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Component; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Component = value ?? null; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).DisplayName = value ?? null; } + + /// Internal Acessors for EstimatedDurationInMinute + long? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.EstimatedDurationInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).EstimatedDurationInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).EstimatedDurationInMinute = value ?? default(long); } + + /// Internal Acessors for Impact + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.Impact { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Impact; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Impact = value ?? null; } + + /// Internal Acessors for InfoLink + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.InfoLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).InfoLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).InfoLink = value ?? null; } + + /// Internal Acessors for Operation + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Operation = value ?? null /* arrayOf */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Readiness + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.Readiness { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadiness; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadiness = value ?? null /* model class */; } + + /// Internal Acessors for ReadinessFailedCheck + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ReadinessFailedCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessFailedCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessFailedCheck = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReadinessLastUpdated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ReadinessLastUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessLastUpdated; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessLastUpdated = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ReadinessMessage + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ReadinessMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessMessage = value ?? null; } + + /// Internal Acessors for ReadinessStatus + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ReadinessStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessStatus = value ?? null; } + + /// Internal Acessors for ReadinessType + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ReadinessType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessType; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessType = value ?? null; } + + /// Internal Acessors for ScheduledByMicrosoft + bool? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ScheduledByMicrosoft { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ScheduledByMicrosoft; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ScheduledByMicrosoft = value ?? default(bool); } + + /// Internal Acessors for ScheduledStartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.ScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ScheduledStartTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for State + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.State { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).State = value ?? null /* model class */; } + + /// Internal Acessors for StateEndedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.StateEndedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateEndedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateEndedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for StateMessage + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.StateMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateMessage = value ?? null; } + + /// Internal Acessors for StateName + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.StateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateName = value ?? null; } + + /// Internal Acessors for StateStartedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceInternal.StateStartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateStartedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateStartedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Name; } + + /// Operations on maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).Operation; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceProperties()); set => this._property = value; } + + /// The provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ProvisioningState; } + + /// A list of failed checks, if any + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReadinessFailedCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessFailedCheck; } + + /// The timestamp of the last readiness update + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public global::System.DateTime? ReadinessLastUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessLastUpdated; } + + /// A summary message of the readiness check result + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string ReadinessMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessMessage; } + + /// The current readiness status of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string ReadinessStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessStatus; } + + /// The type of maintenance readiness check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string ReadinessType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).MaintenanceReadinessType; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// If maintenance is scheduled by Microsoft + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public bool? ScheduledByMicrosoft { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ScheduledByMicrosoft; } + + /// Scheduled maintenance start time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public global::System.DateTime? ScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).ScheduledStartTime; } + + /// Time when current state ended + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public global::System.DateTime? StateEndedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateEndedAt; } + + /// Failure/Success info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string StateMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateMessage; } + + /// Customer presentable maintenance state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string StateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateName; } + + /// Time when current state started + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public global::System.DateTime? StateStartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)Property).StateStartedAt; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public Maintenance() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// A cluster resource + public partial interface IMaintenance : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProxyResource + { + /// + /// Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level", + SerializedName = @"clusterId", + PossibleTypes = new [] { typeof(int) })] + int? ClusterId { get; } + /// type of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"type of maintenance", + SerializedName = @"component", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VCSA", "ESXI", "NSXT")] + string Component { get; } + /// Display name for maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Display name for maintenance", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// Estimated time maintenance will take in minutes + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Estimated time maintenance will take in minutes", + SerializedName = @"estimatedDurationInMinutes", + PossibleTypes = new [] { typeof(long) })] + long? EstimatedDurationInMinute { get; } + /// Impact on the resource during maintenance period + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Impact on the resource during maintenance period", + SerializedName = @"impact", + PossibleTypes = new [] { typeof(string) })] + string Impact { get; } + /// Link to maintenance info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Link to maintenance info", + SerializedName = @"infoLink", + PossibleTypes = new [] { typeof(string) })] + string InfoLink { get; } + /// Operations on maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Operations on maintenance", + SerializedName = @"operations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation) })] + System.Collections.Generic.List Operation { get; } + /// The provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Updating")] + string ProvisioningState { get; } + /// A list of failed checks, if any + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of failed checks, if any", + SerializedName = @"failedChecks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck) })] + System.Collections.Generic.List ReadinessFailedCheck { get; } + /// The timestamp of the last readiness update + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of the last readiness update", + SerializedName = @"lastUpdated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ReadinessLastUpdated { get; } + /// A summary message of the readiness check result + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A summary message of the readiness check result", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ReadinessMessage { get; } + /// The current readiness status of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current readiness status of maintenance", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Ready", "NotReady", "DataNotAvailable", "NotApplicable")] + string ReadinessStatus { get; } + /// The type of maintenance readiness check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of maintenance readiness check", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Precheck", "Preflight")] + string ReadinessType { get; } + /// If maintenance is scheduled by Microsoft + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"If maintenance is scheduled by Microsoft", + SerializedName = @"scheduledByMicrosoft", + PossibleTypes = new [] { typeof(bool) })] + bool? ScheduledByMicrosoft { get; } + /// Scheduled maintenance start time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Scheduled maintenance start time", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ScheduledStartTime { get; } + /// Time when current state ended + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when current state ended", + SerializedName = @"endedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StateEndedAt { get; } + /// Failure/Success info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Failure/Success info", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string StateMessage { get; } + /// Customer presentable maintenance state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Customer presentable maintenance state", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + string StateName { get; } + /// Time when current state started + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when current state started", + SerializedName = @"startedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StateStartedAt { get; } + + } + /// A cluster resource + internal partial interface IMaintenanceInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProxyResourceInternal + { + /// + /// Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level + /// + int? ClusterId { get; set; } + /// type of maintenance + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VCSA", "ESXI", "NSXT")] + string Component { get; set; } + /// Display name for maintenance + string DisplayName { get; set; } + /// Estimated time maintenance will take in minutes + long? EstimatedDurationInMinute { get; set; } + /// Impact on the resource during maintenance period + string Impact { get; set; } + /// Link to maintenance info + string InfoLink { get; set; } + /// Operations on maintenance + System.Collections.Generic.List Operation { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties Property { get; set; } + /// The provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Updating")] + string ProvisioningState { get; set; } + /// Indicates whether the maintenance is ready to proceed + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness Readiness { get; set; } + /// A list of failed checks, if any + System.Collections.Generic.List ReadinessFailedCheck { get; set; } + /// The timestamp of the last readiness update + global::System.DateTime? ReadinessLastUpdated { get; set; } + /// A summary message of the readiness check result + string ReadinessMessage { get; set; } + /// The current readiness status of maintenance + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Ready", "NotReady", "DataNotAvailable", "NotApplicable")] + string ReadinessStatus { get; set; } + /// The type of maintenance readiness check + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Precheck", "Preflight")] + string ReadinessType { get; set; } + /// If maintenance is scheduled by Microsoft + bool? ScheduledByMicrosoft { get; set; } + /// Scheduled maintenance start time + global::System.DateTime? ScheduledStartTime { get; set; } + /// The state of the maintenance + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState State { get; set; } + /// Time when current state ended + global::System.DateTime? StateEndedAt { get; set; } + /// Failure/Success info + string StateMessage { get; set; } + /// Customer presentable maintenance state + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + string StateName { get; set; } + /// Time when current state started + global::System.DateTime? StateStartedAt { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.json.cs new file mode 100644 index 000000000000..928ec87c585f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Maintenance.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A cluster resource + public partial class Maintenance + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance. + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new Maintenance(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal Maintenance(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.PowerShell.cs new file mode 100644 index 000000000000..d26d94789365 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Details about a failed maintenance check + [System.ComponentModel.TypeConverter(typeof(MaintenanceFailedCheckTypeConverter))] + public partial class MaintenanceFailedCheck + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceFailedCheck(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.VMware.Models.IMaintenanceFailedCheck DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceFailedCheck(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.VMware.Models.IMaintenanceFailedCheck FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceFailedCheck(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ImpactedResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).ImpactedResource = (System.Collections.Generic.List) content.GetValueForProperty("ImpactedResource",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).ImpactedResource, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResourceTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MaintenanceFailedCheck(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ImpactedResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).ImpactedResource = (System.Collections.Generic.List) content.GetValueForProperty("ImpactedResource",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal)this).ImpactedResource, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResourceTypeConverter.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details about a failed maintenance check + [System.ComponentModel.TypeConverter(typeof(MaintenanceFailedCheckTypeConverter))] + public partial interface IMaintenanceFailedCheck + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.TypeConverter.cs new file mode 100644 index 000000000000..062df75ca0c7 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceFailedCheckTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceFailedCheck ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceFailedCheck.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceFailedCheck.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceFailedCheck.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.cs new file mode 100644 index 000000000000..824d35568f20 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Details about a failed maintenance check + public partial class MaintenanceFailedCheck : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _impactedResource; + + /// A list of resources impacted by the failed check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List ImpactedResource { get => this._impactedResource; } + + /// Internal Acessors for ImpactedResource + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal.ImpactedResource { get => this._impactedResource; set { {_impactedResource = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheckInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the failed check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Creates an new instance. + public MaintenanceFailedCheck() + { + + } + } + /// Details about a failed maintenance check + public partial interface IMaintenanceFailedCheck : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// A list of resources impacted by the failed check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of resources impacted by the failed check", + SerializedName = @"impactedResources", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource) })] + System.Collections.Generic.List ImpactedResource { get; } + /// The name of the failed check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the failed check", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + + } + /// Details about a failed maintenance check + internal partial interface IMaintenanceFailedCheckInternal + + { + /// A list of resources impacted by the failed check + System.Collections.Generic.List ImpactedResource { get; set; } + /// The name of the failed check + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.json.cs new file mode 100644 index 000000000000..9b3ea1b5859c --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceFailedCheck.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Details about a failed maintenance check + public partial class MaintenanceFailedCheck + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceFailedCheck(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceFailedCheck(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_impactedResource = If( json?.PropertyT("impactedResources"), out var __jsonImpactedResources) ? If( __jsonImpactedResources as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IImpactedMaintenanceResource) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ImpactedMaintenanceResource.FromJson(__u) )) ))() : null : _impactedResource;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._impactedResource) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._impactedResource ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("impactedResources",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.PowerShell.cs new file mode 100644 index 000000000000..01d10e4fb561 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// The response of a Maintenance list operation. + [System.ComponentModel.TypeConverter(typeof(MaintenanceListResultTypeConverter))] + public partial class MaintenanceListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceListResult(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.VMware.Models.IMaintenanceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceListResult(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.VMware.Models.IMaintenanceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceListResult(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.VMware.Models.IMaintenanceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResultInternal)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 MaintenanceListResult(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.VMware.Models.IMaintenanceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a Maintenance list operation. + [System.ComponentModel.TypeConverter(typeof(MaintenanceListResultTypeConverter))] + public partial interface IMaintenanceListResult + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.TypeConverter.cs new file mode 100644 index 000000000000..fc2e1d7e2332 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceListResultTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceListResult.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.cs new file mode 100644 index 000000000000..72769b05cbc3 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The response of a Maintenance list operation. + public partial class MaintenanceListResult : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Maintenance items on this page + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public MaintenanceListResult() + { + + } + } + /// The response of a Maintenance list operation. + public partial interface IMaintenanceListResult : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Maintenance items on this page + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Maintenance items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a Maintenance list operation. + internal partial interface IMaintenanceListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Maintenance items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.json.cs new file mode 100644 index 000000000000..d7176020bcfe --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceListResult.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The response of a Maintenance list operation. + public partial class MaintenanceListResult + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceListResult(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.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.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.PowerShell.cs new file mode 100644 index 000000000000..d4b98a1e17d1 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Defines operations that can be performed on maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceManagementOperationTypeConverter))] + public partial class MaintenanceManagementOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceManagementOperation(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.VMware.Models.IMaintenanceManagementOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceManagementOperation(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.VMware.Models.IMaintenanceManagementOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceManagementOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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 MaintenanceManagementOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines operations that can be performed on maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceManagementOperationTypeConverter))] + public partial interface IMaintenanceManagementOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.TypeConverter.cs new file mode 100644 index 000000000000..0f4341d840bd --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceManagementOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceManagementOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceManagementOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceManagementOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceManagementOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.cs new file mode 100644 index 000000000000..c80eb9029e8b --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Defines operations that can be performed on maintenance + public partial class MaintenanceManagementOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal + { + + /// Backing field for property. + private string _kind; + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Kind { get => this._kind; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal.Kind { get => this._kind; set { {_kind = value;} } } + + /// Creates an new instance. + public MaintenanceManagementOperation() + { + + } + } + /// Defines operations that can be performed on maintenance + public partial interface IMaintenanceManagementOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The kind of operation", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Schedule", "Reschedule", "MaintenanceReadinessRefresh")] + string Kind { get; } + + } + /// Defines operations that can be performed on maintenance + internal partial interface IMaintenanceManagementOperationInternal + + { + /// The kind of operation + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Schedule", "Reschedule", "MaintenanceReadinessRefresh")] + string Kind { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.json.cs new file mode 100644 index 000000000000..4de842c70532 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceManagementOperation.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Defines operations that can be performed on maintenance + public partial class MaintenanceManagementOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("kind") ) + { + case "MaintenanceReadinessRefresh": + { + return new MaintenanceReadinessRefreshOperation(json); + } + case "Reschedule": + { + return new RescheduleOperation(json); + } + case "Schedule": + { + return new ScheduleOperation(json); + } + } + return new MaintenanceManagementOperation(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceManagementOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.PowerShell.cs new file mode 100644 index 000000000000..b38efa5efcab --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.PowerShell.cs @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// properties of a maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenancePropertiesTypeConverter))] + public partial class MaintenanceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceProperties(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.VMware.Models.IMaintenanceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceProperties(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.VMware.Models.IMaintenanceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceStateTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceReadiness")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadiness = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness) content.GetValueForProperty("MaintenanceReadiness",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadiness, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadinessTypeConverter.ConvertFrom); + } + if (content.Contains("Component")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Component, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ClusterId = (int?) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ClusterId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InfoLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).InfoLink = (string) content.GetValueForProperty("InfoLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).InfoLink, global::System.Convert.ToString); + } + if (content.Contains("Impact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Impact = (string) content.GetValueForProperty("Impact",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Impact, global::System.Convert.ToString); + } + if (content.Contains("ScheduledByMicrosoft")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledByMicrosoft = (bool?) content.GetValueForProperty("ScheduledByMicrosoft",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledByMicrosoft, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledStartTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EstimatedDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).EstimatedDurationInMinute = (long?) content.GetValueForProperty("EstimatedDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).EstimatedDurationInMinute, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Operation = (System.Collections.Generic.List) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Operation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperationTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceReadinessStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessStatus = (string) content.GetValueForProperty("MaintenanceReadinessStatus",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessStatus, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceReadinessMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessMessage = (string) content.GetValueForProperty("MaintenanceReadinessMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessMessage, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceReadinessFailedCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessFailedCheck = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceReadinessFailedCheck",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessFailedCheck, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheckTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceReadinessLastUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessLastUpdated = (global::System.DateTime?) content.GetValueForProperty("MaintenanceReadinessLastUpdated",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessLastUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateName = (string) content.GetValueForProperty("StateName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateName, global::System.Convert.ToString); + } + if (content.Contains("StateMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateMessage = (string) content.GetValueForProperty("StateMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateMessage, global::System.Convert.ToString); + } + if (content.Contains("StateStartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateStartedAt = (global::System.DateTime?) content.GetValueForProperty("StateStartedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateStartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateEndedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateEndedAt = (global::System.DateTime?) content.GetValueForProperty("StateEndedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateEndedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MaintenanceReadinessType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessType = (string) content.GetValueForProperty("MaintenanceReadinessType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessType, 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 MaintenanceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceStateTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceReadiness")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadiness = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness) content.GetValueForProperty("MaintenanceReadiness",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadiness, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadinessTypeConverter.ConvertFrom); + } + if (content.Contains("Component")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Component = (string) content.GetValueForProperty("Component",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Component, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ClusterId = (int?) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ClusterId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InfoLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).InfoLink = (string) content.GetValueForProperty("InfoLink",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).InfoLink, global::System.Convert.ToString); + } + if (content.Contains("Impact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Impact = (string) content.GetValueForProperty("Impact",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Impact, global::System.Convert.ToString); + } + if (content.Contains("ScheduledByMicrosoft")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledByMicrosoft = (bool?) content.GetValueForProperty("ScheduledByMicrosoft",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledByMicrosoft, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledStartTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ScheduledStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EstimatedDurationInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).EstimatedDurationInMinute = (long?) content.GetValueForProperty("EstimatedDurationInMinute",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).EstimatedDurationInMinute, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Operation = (System.Collections.Generic.List) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).Operation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperationTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceReadinessStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessStatus = (string) content.GetValueForProperty("MaintenanceReadinessStatus",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessStatus, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceReadinessMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessMessage = (string) content.GetValueForProperty("MaintenanceReadinessMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessMessage, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceReadinessFailedCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessFailedCheck = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceReadinessFailedCheck",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessFailedCheck, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheckTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceReadinessLastUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessLastUpdated = (global::System.DateTime?) content.GetValueForProperty("MaintenanceReadinessLastUpdated",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessLastUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateName = (string) content.GetValueForProperty("StateName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateName, global::System.Convert.ToString); + } + if (content.Contains("StateMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateMessage = (string) content.GetValueForProperty("StateMessage",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateMessage, global::System.Convert.ToString); + } + if (content.Contains("StateStartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateStartedAt = (global::System.DateTime?) content.GetValueForProperty("StateStartedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateStartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StateEndedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateEndedAt = (global::System.DateTime?) content.GetValueForProperty("StateEndedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).StateEndedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MaintenanceReadinessType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessType = (string) content.GetValueForProperty("MaintenanceReadinessType",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal)this).MaintenanceReadinessType, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// properties of a maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenancePropertiesTypeConverter))] + public partial interface IMaintenanceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.TypeConverter.cs new file mode 100644 index 000000000000..9a46f4bebb13 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenancePropertiesTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceProperties.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.cs new file mode 100644 index 000000000000..efa544caba65 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// properties of a maintenance + public partial class MaintenanceProperties : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal + { + + /// Backing field for property. + private int? _clusterId; + + /// + /// Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public int? ClusterId { get => this._clusterId; } + + /// Backing field for property. + private string _component; + + /// type of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Component { get => this._component; } + + /// Backing field for property. + private string _displayName; + + /// Display name for maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Backing field for property. + private long? _estimatedDurationInMinute; + + /// Estimated time maintenance will take in minutes + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public long? EstimatedDurationInMinute { get => this._estimatedDurationInMinute; } + + /// Backing field for property. + private string _impact; + + /// Impact on the resource during maintenance period + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Impact { get => this._impact; } + + /// Backing field for property. + private string _infoLink; + + /// Link to maintenance info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string InfoLink { get => this._infoLink; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness _maintenanceReadiness; + + /// Indicates whether the maintenance is ready to proceed + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness MaintenanceReadiness { get => (this._maintenanceReadiness = this._maintenanceReadiness ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadiness()); } + + /// A list of failed checks, if any + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceReadinessFailedCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).FailedCheck; } + + /// The timestamp of the last readiness update + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public global::System.DateTime? MaintenanceReadinessLastUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).LastUpdated; } + + /// A summary message of the readiness check result + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string MaintenanceReadinessMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Message; } + + /// The current readiness status of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string MaintenanceReadinessStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Status; } + + /// The type of maintenance readiness check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string MaintenanceReadinessType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Type; } + + /// Internal Acessors for ClusterId + int? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.ClusterId { get => this._clusterId; set { {_clusterId = value;} } } + + /// Internal Acessors for Component + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.Component { get => this._component; set { {_component = value;} } } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for EstimatedDurationInMinute + long? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.EstimatedDurationInMinute { get => this._estimatedDurationInMinute; set { {_estimatedDurationInMinute = value;} } } + + /// Internal Acessors for Impact + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.Impact { get => this._impact; set { {_impact = value;} } } + + /// Internal Acessors for InfoLink + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.InfoLink { get => this._infoLink; set { {_infoLink = value;} } } + + /// Internal Acessors for MaintenanceReadiness + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.MaintenanceReadiness { get => (this._maintenanceReadiness = this._maintenanceReadiness ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadiness()); set { {_maintenanceReadiness = value;} } } + + /// Internal Acessors for MaintenanceReadinessFailedCheck + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.MaintenanceReadinessFailedCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).FailedCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).FailedCheck = value ?? null /* arrayOf */; } + + /// Internal Acessors for MaintenanceReadinessLastUpdated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.MaintenanceReadinessLastUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).LastUpdated; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).LastUpdated = value ?? default(global::System.DateTime); } + + /// Internal Acessors for MaintenanceReadinessMessage + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.MaintenanceReadinessMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Message = value ?? null; } + + /// Internal Acessors for MaintenanceReadinessStatus + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.MaintenanceReadinessStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Status = value ?? null; } + + /// Internal Acessors for MaintenanceReadinessType + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.MaintenanceReadinessType { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)MaintenanceReadiness).Type = value ?? null; } + + /// Internal Acessors for Operation + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ScheduledByMicrosoft + bool? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.ScheduledByMicrosoft { get => this._scheduledByMicrosoft; set { {_scheduledByMicrosoft = value;} } } + + /// Internal Acessors for ScheduledStartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.ScheduledStartTime { get => this._scheduledStartTime; set { {_scheduledStartTime = value;} } } + + /// Internal Acessors for State + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.State { get => (this._state = this._state ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceState()); set { {_state = value;} } } + + /// Internal Acessors for StateEndedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.StateEndedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).EndedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).EndedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for StateMessage + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.StateMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).Message = value ?? null; } + + /// Internal Acessors for StateName + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.StateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).Name = value ?? null; } + + /// Internal Acessors for StateStartedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenancePropertiesInternal.StateStartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).StartedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).StartedAt = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private System.Collections.Generic.List _operation; + + /// Operations on maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Operation { get => this._operation; } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private bool? _scheduledByMicrosoft; + + /// If maintenance is scheduled by Microsoft + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public bool? ScheduledByMicrosoft { get => this._scheduledByMicrosoft; } + + /// Backing field for property. + private global::System.DateTime? _scheduledStartTime; + + /// Scheduled maintenance start time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? ScheduledStartTime { get => this._scheduledStartTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState _state; + + /// The state of the maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState State { get => (this._state = this._state ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceState()); } + + /// Time when current state ended + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public global::System.DateTime? StateEndedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).EndedAt; } + + /// Failure/Success info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string StateMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).Message; } + + /// Customer presentable maintenance state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string StateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).Name; } + + /// Time when current state started + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public global::System.DateTime? StateStartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)State).StartedAt; } + + /// Creates an new instance. + public MaintenanceProperties() + { + + } + } + /// properties of a maintenance + public partial interface IMaintenanceProperties : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// + /// Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level + /// + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level", + SerializedName = @"clusterId", + PossibleTypes = new [] { typeof(int) })] + int? ClusterId { get; } + /// type of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"type of maintenance", + SerializedName = @"component", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VCSA", "ESXI", "NSXT")] + string Component { get; } + /// Display name for maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Display name for maintenance", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// Estimated time maintenance will take in minutes + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Estimated time maintenance will take in minutes", + SerializedName = @"estimatedDurationInMinutes", + PossibleTypes = new [] { typeof(long) })] + long? EstimatedDurationInMinute { get; } + /// Impact on the resource during maintenance period + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Impact on the resource during maintenance period", + SerializedName = @"impact", + PossibleTypes = new [] { typeof(string) })] + string Impact { get; } + /// Link to maintenance info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Link to maintenance info", + SerializedName = @"infoLink", + PossibleTypes = new [] { typeof(string) })] + string InfoLink { get; } + /// A list of failed checks, if any + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of failed checks, if any", + SerializedName = @"failedChecks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck) })] + System.Collections.Generic.List MaintenanceReadinessFailedCheck { get; } + /// The timestamp of the last readiness update + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of the last readiness update", + SerializedName = @"lastUpdated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? MaintenanceReadinessLastUpdated { get; } + /// A summary message of the readiness check result + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A summary message of the readiness check result", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceReadinessMessage { get; } + /// The current readiness status of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current readiness status of maintenance", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Ready", "NotReady", "DataNotAvailable", "NotApplicable")] + string MaintenanceReadinessStatus { get; } + /// The type of maintenance readiness check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of maintenance readiness check", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Precheck", "Preflight")] + string MaintenanceReadinessType { get; } + /// Operations on maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Operations on maintenance", + SerializedName = @"operations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation) })] + System.Collections.Generic.List Operation { get; } + /// The provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Updating")] + string ProvisioningState { get; } + /// If maintenance is scheduled by Microsoft + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"If maintenance is scheduled by Microsoft", + SerializedName = @"scheduledByMicrosoft", + PossibleTypes = new [] { typeof(bool) })] + bool? ScheduledByMicrosoft { get; } + /// Scheduled maintenance start time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Scheduled maintenance start time", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ScheduledStartTime { get; } + /// Time when current state ended + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when current state ended", + SerializedName = @"endedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StateEndedAt { get; } + /// Failure/Success info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Failure/Success info", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string StateMessage { get; } + /// Customer presentable maintenance state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Customer presentable maintenance state", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + string StateName { get; } + /// Time when current state started + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time when current state started", + SerializedName = @"startedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StateStartedAt { get; } + + } + /// properties of a maintenance + internal partial interface IMaintenancePropertiesInternal + + { + /// + /// Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level + /// + int? ClusterId { get; set; } + /// type of maintenance + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VCSA", "ESXI", "NSXT")] + string Component { get; set; } + /// Display name for maintenance + string DisplayName { get; set; } + /// Estimated time maintenance will take in minutes + long? EstimatedDurationInMinute { get; set; } + /// Impact on the resource during maintenance period + string Impact { get; set; } + /// Link to maintenance info + string InfoLink { get; set; } + /// Indicates whether the maintenance is ready to proceed + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness MaintenanceReadiness { get; set; } + /// A list of failed checks, if any + System.Collections.Generic.List MaintenanceReadinessFailedCheck { get; set; } + /// The timestamp of the last readiness update + global::System.DateTime? MaintenanceReadinessLastUpdated { get; set; } + /// A summary message of the readiness check result + string MaintenanceReadinessMessage { get; set; } + /// The current readiness status of maintenance + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Ready", "NotReady", "DataNotAvailable", "NotApplicable")] + string MaintenanceReadinessStatus { get; set; } + /// The type of maintenance readiness check + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Precheck", "Preflight")] + string MaintenanceReadinessType { get; set; } + /// Operations on maintenance + System.Collections.Generic.List Operation { get; set; } + /// The provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Updating")] + string ProvisioningState { get; set; } + /// If maintenance is scheduled by Microsoft + bool? ScheduledByMicrosoft { get; set; } + /// Scheduled maintenance start time + global::System.DateTime? ScheduledStartTime { get; set; } + /// The state of the maintenance + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState State { get; set; } + /// Time when current state ended + global::System.DateTime? StateEndedAt { get; set; } + /// Failure/Success info + string StateMessage { get; set; } + /// Customer presentable maintenance state + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + string StateName { get; set; } + /// Time when current state started + global::System.DateTime? StateStartedAt { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.json.cs new file mode 100644 index 000000000000..943d58b5f12a --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceProperties.json.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// properties of a maintenance + public partial class MaintenanceProperties + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceProperties(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_state = If( json?.PropertyT("state"), out var __jsonState) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceState.FromJson(__jsonState) : _state;} + {_maintenanceReadiness = If( json?.PropertyT("maintenanceReadiness"), out var __jsonMaintenanceReadiness) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReadiness.FromJson(__jsonMaintenanceReadiness) : _maintenanceReadiness;} + {_component = If( json?.PropertyT("component"), out var __jsonComponent) ? (string)__jsonComponent : (string)_component;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_clusterId = If( json?.PropertyT("clusterId"), out var __jsonClusterId) ? (int?)__jsonClusterId : _clusterId;} + {_infoLink = If( json?.PropertyT("infoLink"), out var __jsonInfoLink) ? (string)__jsonInfoLink : (string)_infoLink;} + {_impact = If( json?.PropertyT("impact"), out var __jsonImpact) ? (string)__jsonImpact : (string)_impact;} + {_scheduledByMicrosoft = If( json?.PropertyT("scheduledByMicrosoft"), out var __jsonScheduledByMicrosoft) ? (bool?)__jsonScheduledByMicrosoft : _scheduledByMicrosoft;} + {_scheduledStartTime = If( json?.PropertyT("scheduledStartTime"), out var __jsonScheduledStartTime) ? global::System.DateTime.TryParse((string)__jsonScheduledStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonScheduledStartTimeValue) ? __jsonScheduledStartTimeValue : _scheduledStartTime : _scheduledStartTime;} + {_estimatedDurationInMinute = If( json?.PropertyT("estimatedDurationInMinutes"), out var __jsonEstimatedDurationInMinutes) ? (long?)__jsonEstimatedDurationInMinutes : _estimatedDurationInMinute;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_operation = If( json?.PropertyT("operations"), out var __jsonOperations) ? If( __jsonOperations as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation.FromJson(__u) )) ))() : null : _operation;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._state ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) this._state.ToJson(null,serializationMode) : null, "state" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maintenanceReadiness ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) this._maintenanceReadiness.ToJson(null,serializationMode) : null, "maintenanceReadiness" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._component)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._component.ToString()) : null, "component" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._clusterId ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNumber((int)this._clusterId) : null, "clusterId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._infoLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._infoLink.ToString()) : null, "infoLink" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._impact)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._impact.ToString()) : null, "impact" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._scheduledByMicrosoft ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonBoolean((bool)this._scheduledByMicrosoft) : null, "scheduledByMicrosoft" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._scheduledStartTime ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._scheduledStartTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "scheduledStartTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._estimatedDurationInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNumber((long)this._estimatedDurationInMinute) : null, "estimatedDurationInMinutes" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._operation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._operation ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("operations",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.PowerShell.cs new file mode 100644 index 000000000000..a124a7d803cc --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Maintenance readiness details + [System.ComponentModel.TypeConverter(typeof(MaintenanceReadinessTypeConverter))] + public partial class MaintenanceReadiness + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceReadiness(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.VMware.Models.IMaintenanceReadiness DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceReadiness(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.VMware.Models.IMaintenanceReadiness FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceReadiness(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.VMware.Models.IMaintenanceReadinessInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("FailedCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).FailedCheck = (System.Collections.Generic.List) content.GetValueForProperty("FailedCheck",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).FailedCheck, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheckTypeConverter.ConvertFrom)); + } + if (content.Contains("LastUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).LastUpdated = (global::System.DateTime?) content.GetValueForProperty("LastUpdated",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).LastUpdated, (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 MaintenanceReadiness(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.VMware.Models.IMaintenanceReadinessInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("FailedCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).FailedCheck = (System.Collections.Generic.List) content.GetValueForProperty("FailedCheck",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).FailedCheck, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheckTypeConverter.ConvertFrom)); + } + if (content.Contains("LastUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).LastUpdated = (global::System.DateTime?) content.GetValueForProperty("LastUpdated",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal)this).LastUpdated, (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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Maintenance readiness details + [System.ComponentModel.TypeConverter(typeof(MaintenanceReadinessTypeConverter))] + public partial interface IMaintenanceReadiness + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.TypeConverter.cs new file mode 100644 index 000000000000..6c9e0a8a6932 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceReadinessTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceReadiness ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceReadiness.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceReadiness.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceReadiness.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.cs new file mode 100644 index 000000000000..e3b68870acef --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Maintenance readiness details + public partial class MaintenanceReadiness : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _failedCheck; + + /// A list of failed checks, if any + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List FailedCheck { get => this._failedCheck; } + + /// Backing field for property. + private global::System.DateTime? _lastUpdated; + + /// The timestamp of the last readiness update + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? LastUpdated { get => this._lastUpdated; } + + /// Backing field for property. + private string _message; + + /// A summary message of the readiness check result + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for FailedCheck + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal.FailedCheck { get => this._failedCheck; set { {_failedCheck = value;} } } + + /// Internal Acessors for LastUpdated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal.LastUpdated { get => this._lastUpdated; set { {_lastUpdated = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal.Status { get => this._status; set { {_status = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _status; + + /// The current readiness status of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Status { get => this._status; } + + /// Backing field for property. + private string _type; + + /// The type of maintenance readiness check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public MaintenanceReadiness() + { + + } + } + /// Maintenance readiness details + public partial interface IMaintenanceReadiness : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// A list of failed checks, if any + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of failed checks, if any", + SerializedName = @"failedChecks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck) })] + System.Collections.Generic.List FailedCheck { get; } + /// The timestamp of the last readiness update + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of the last readiness update", + SerializedName = @"lastUpdated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastUpdated { get; } + /// A summary message of the readiness check result + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A summary message of the readiness check result", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The current readiness status of maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current readiness status of maintenance", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Ready", "NotReady", "DataNotAvailable", "NotApplicable")] + string Status { get; } + /// The type of maintenance readiness check + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of maintenance readiness check", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Precheck", "Preflight")] + string Type { get; } + + } + /// Maintenance readiness details + internal partial interface IMaintenanceReadinessInternal + + { + /// A list of failed checks, if any + System.Collections.Generic.List FailedCheck { get; set; } + /// The timestamp of the last readiness update + global::System.DateTime? LastUpdated { get; set; } + /// A summary message of the readiness check result + string Message { get; set; } + /// The current readiness status of maintenance + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Ready", "NotReady", "DataNotAvailable", "NotApplicable")] + string Status { get; set; } + /// The type of maintenance readiness check + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Precheck", "Preflight")] + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.json.cs new file mode 100644 index 000000000000..d44997c56db6 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadiness.json.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Maintenance readiness details + public partial class MaintenanceReadiness + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadiness FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceReadiness(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceReadiness(Microsoft.Azure.PowerShell.Cmdlets.VMware.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;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_failedCheck = If( json?.PropertyT("failedChecks"), out var __jsonFailedChecks) ? If( __jsonFailedChecks as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceFailedCheck) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceFailedCheck.FromJson(__u) )) ))() : null : _failedCheck;} + {_lastUpdated = If( json?.PropertyT("lastUpdated"), out var __jsonLastUpdated) ? global::System.DateTime.TryParse((string)__jsonLastUpdated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastUpdatedValue) ? __jsonLastUpdatedValue : _lastUpdated : _lastUpdated;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._failedCheck) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._failedCheck ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("failedChecks",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._lastUpdated ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._lastUpdated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastUpdated" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.PowerShell.cs new file mode 100644 index 000000000000..1b0b8b5001b2 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.PowerShell.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Refresh MaintenanceReadiness status + [System.ComponentModel.TypeConverter(typeof(MaintenanceReadinessRefreshOperationTypeConverter))] + public partial class MaintenanceReadinessRefreshOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceReadinessRefreshOperation(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.VMware.Models.IMaintenanceReadinessRefreshOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceReadinessRefreshOperation(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.VMware.Models.IMaintenanceReadinessRefreshOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceReadinessRefreshOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisabledReason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).DisabledReason = (string) content.GetValueForProperty("DisabledReason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).DisabledReason, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("RefreshedByMicrosoft")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).RefreshedByMicrosoft = (bool?) content.GetValueForProperty("RefreshedByMicrosoft",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).RefreshedByMicrosoft, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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 MaintenanceReadinessRefreshOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisabledReason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).DisabledReason = (string) content.GetValueForProperty("DisabledReason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).DisabledReason, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("RefreshedByMicrosoft")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).RefreshedByMicrosoft = (bool?) content.GetValueForProperty("RefreshedByMicrosoft",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).RefreshedByMicrosoft, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Refresh MaintenanceReadiness status + [System.ComponentModel.TypeConverter(typeof(MaintenanceReadinessRefreshOperationTypeConverter))] + public partial interface IMaintenanceReadinessRefreshOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.TypeConverter.cs new file mode 100644 index 000000000000..b00d40486fce --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceReadinessRefreshOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceReadinessRefreshOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceReadinessRefreshOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceReadinessRefreshOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceReadinessRefreshOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.cs new file mode 100644 index 000000000000..3c3e3f7c5ff2 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Refresh MaintenanceReadiness status + public partial class MaintenanceReadinessRefreshOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation __maintenanceManagementOperation = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation(); + + /// Backing field for property. + private string _disabledReason; + + /// Reason disabling refresh for maintenanceReadiness + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string DisabledReason { get => this._disabledReason; } + + /// Backing field for property. + private bool? _isDisabled; + + /// If maintenanceReadiness refresh is disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public bool? IsDisabled { get => this._isDisabled; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "MaintenanceReadinessRefresh"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)__maintenanceManagementOperation).Kind = "MaintenanceReadinessRefresh"; } + + /// Backing field for property. + private string _message; + + /// Additional message about the operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for DisabledReason + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal.DisabledReason { get => this._disabledReason; set { {_disabledReason = value;} } } + + /// Internal Acessors for IsDisabled + bool? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal.IsDisabled { get => this._isDisabled; set { {_isDisabled = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for RefreshedByMicrosoft + bool? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal.RefreshedByMicrosoft { get => this._refreshedByMicrosoft; set { {_refreshedByMicrosoft = value;} } } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperationInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private bool? _refreshedByMicrosoft; + + /// Indicates if the operation was refreshed by Microsoft + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public bool? RefreshedByMicrosoft { get => this._refreshedByMicrosoft; } + + /// Backing field for property. + private string _status; + + /// Status of the operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Status { get => this._status; } + + /// Creates an new instance. + public MaintenanceReadinessRefreshOperation() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__maintenanceManagementOperation), __maintenanceManagementOperation); + await eventListener.AssertObjectIsValid(nameof(__maintenanceManagementOperation), __maintenanceManagementOperation); + } + } + /// Refresh MaintenanceReadiness status + public partial interface IMaintenanceReadinessRefreshOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation + { + /// Reason disabling refresh for maintenanceReadiness + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Reason disabling refresh for maintenanceReadiness", + SerializedName = @"disabledReason", + PossibleTypes = new [] { typeof(string) })] + string DisabledReason { get; } + /// If maintenanceReadiness refresh is disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"If maintenanceReadiness refresh is disabled", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDisabled { get; } + /// Additional message about the operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional message about the operation", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Indicates if the operation was refreshed by Microsoft + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates if the operation was refreshed by Microsoft", + SerializedName = @"refreshedByMicrosoft", + PossibleTypes = new [] { typeof(bool) })] + bool? RefreshedByMicrosoft { get; } + /// Status of the operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of the operation", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("InProgress", "NotStarted", "Failed", "NotApplicable")] + string Status { get; } + + } + /// Refresh MaintenanceReadiness status + internal partial interface IMaintenanceReadinessRefreshOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal + { + /// Reason disabling refresh for maintenanceReadiness + string DisabledReason { get; set; } + /// If maintenanceReadiness refresh is disabled + bool? IsDisabled { get; set; } + /// Additional message about the operation + string Message { get; set; } + /// Indicates if the operation was refreshed by Microsoft + bool? RefreshedByMicrosoft { get; set; } + /// Status of the operation + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("InProgress", "NotStarted", "Failed", "NotApplicable")] + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.json.cs new file mode 100644 index 000000000000..aa2fda6af831 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReadinessRefreshOperation.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Refresh MaintenanceReadiness status + public partial class MaintenanceReadinessRefreshOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReadinessRefreshOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceReadinessRefreshOperation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceReadinessRefreshOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __maintenanceManagementOperation = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation(json); + {_isDisabled = If( json?.PropertyT("isDisabled"), out var __jsonIsDisabled) ? (bool?)__jsonIsDisabled : _isDisabled;} + {_disabledReason = If( json?.PropertyT("disabledReason"), out var __jsonDisabledReason) ? (string)__jsonDisabledReason : (string)_disabledReason;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_refreshedByMicrosoft = If( json?.PropertyT("refreshedByMicrosoft"), out var __jsonRefreshedByMicrosoft) ? (bool?)__jsonRefreshedByMicrosoft : _refreshedByMicrosoft;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __maintenanceManagementOperation?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDisabled ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonBoolean((bool)this._isDisabled) : null, "isDisabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._disabledReason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._disabledReason.ToString()) : null, "disabledReason" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._refreshedByMicrosoft ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonBoolean((bool)this._refreshedByMicrosoft) : null, "refreshedByMicrosoft" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.PowerShell.cs new file mode 100644 index 000000000000..82709bd0b903 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// reschedule a maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceRescheduleTypeConverter))] + public partial class MaintenanceReschedule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceReschedule(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.VMware.Models.IMaintenanceReschedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceReschedule(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.VMware.Models.IMaintenanceReschedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceReschedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RescheduleTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).RescheduleTime = (global::System.DateTime?) content.GetValueForProperty("RescheduleTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).RescheduleTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).Message, 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 MaintenanceReschedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RescheduleTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).RescheduleTime = (global::System.DateTime?) content.GetValueForProperty("RescheduleTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).RescheduleTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal)this).Message, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// reschedule a maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceRescheduleTypeConverter))] + public partial interface IMaintenanceReschedule + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.TypeConverter.cs new file mode 100644 index 000000000000..864cfddf52b4 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceRescheduleTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceReschedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceReschedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceReschedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceReschedule.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.cs new file mode 100644 index 000000000000..ea3b5e1a892e --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// reschedule a maintenance + public partial class MaintenanceReschedule : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceRescheduleInternal + { + + /// Backing field for property. + private string _message; + + /// rescheduling reason + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private global::System.DateTime? _rescheduleTime; + + /// reschedule time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? RescheduleTime { get => this._rescheduleTime; set => this._rescheduleTime = value; } + + /// Creates an new instance. + public MaintenanceReschedule() + { + + } + } + /// reschedule a maintenance + public partial interface IMaintenanceReschedule : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// rescheduling reason + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"rescheduling reason", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// reschedule time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"reschedule time", + SerializedName = @"rescheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RescheduleTime { get; set; } + + } + /// reschedule a maintenance + internal partial interface IMaintenanceRescheduleInternal + + { + /// rescheduling reason + string Message { get; set; } + /// reschedule time + global::System.DateTime? RescheduleTime { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.json.cs new file mode 100644 index 000000000000..4713f65b6e35 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceReschedule.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// reschedule a maintenance + public partial class MaintenanceReschedule + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceReschedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceReschedule(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_rescheduleTime = If( json?.PropertyT("rescheduleTime"), out var __jsonRescheduleTime) ? global::System.DateTime.TryParse((string)__jsonRescheduleTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRescheduleTimeValue) ? __jsonRescheduleTimeValue : _rescheduleTime : _rescheduleTime;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._rescheduleTime ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._rescheduleTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "rescheduleTime" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.PowerShell.cs new file mode 100644 index 000000000000..903366033dab --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// schedule a maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceScheduleTypeConverter))] + public partial class MaintenanceSchedule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceSchedule(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.VMware.Models.IMaintenanceSchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceSchedule(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.VMware.Models.IMaintenanceSchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceSchedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ScheduleTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).ScheduleTime = (global::System.DateTime?) content.GetValueForProperty("ScheduleTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).ScheduleTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).Message, 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 MaintenanceSchedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ScheduleTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).ScheduleTime = (global::System.DateTime?) content.GetValueForProperty("ScheduleTime",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).ScheduleTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal)this).Message, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// schedule a maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceScheduleTypeConverter))] + public partial interface IMaintenanceSchedule + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.TypeConverter.cs new file mode 100644 index 000000000000..6d0cf77d51cf --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceScheduleTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceSchedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceSchedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceSchedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceSchedule.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.cs new file mode 100644 index 000000000000..878a3128ac94 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// schedule a maintenance + public partial class MaintenanceSchedule : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceScheduleInternal + { + + /// Backing field for property. + private string _message; + + /// scheduling message + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private global::System.DateTime? _scheduleTime; + + /// schedule time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? ScheduleTime { get => this._scheduleTime; set => this._scheduleTime = value; } + + /// Creates an new instance. + public MaintenanceSchedule() + { + + } + } + /// schedule a maintenance + public partial interface IMaintenanceSchedule : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// scheduling message + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"scheduling message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// schedule time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"schedule time", + SerializedName = @"scheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ScheduleTime { get; set; } + + } + /// schedule a maintenance + internal partial interface IMaintenanceScheduleInternal + + { + /// scheduling message + string Message { get; set; } + /// schedule time + global::System.DateTime? ScheduleTime { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.json.cs new file mode 100644 index 000000000000..17efc65931da --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceSchedule.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// schedule a maintenance + public partial class MaintenanceSchedule + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceSchedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceSchedule(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scheduleTime = If( json?.PropertyT("scheduleTime"), out var __jsonScheduleTime) ? global::System.DateTime.TryParse((string)__jsonScheduleTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonScheduleTimeValue) ? __jsonScheduleTimeValue : _scheduleTime : _scheduleTime;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._scheduleTime ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._scheduleTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "scheduleTime" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.PowerShell.cs new file mode 100644 index 000000000000..d5b6d864d139 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// state of the maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceStateTypeConverter))] + public partial class MaintenanceState + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceState(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.VMware.Models.IMaintenanceState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceState(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.VMware.Models.IMaintenanceState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceState(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("StartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).StartedAt = (global::System.DateTime?) content.GetValueForProperty("StartedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).StartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).EndedAt = (global::System.DateTime?) content.GetValueForProperty("EndedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).EndedAt, (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 MaintenanceState(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("StartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).StartedAt = (global::System.DateTime?) content.GetValueForProperty("StartedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).StartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).EndedAt = (global::System.DateTime?) content.GetValueForProperty("EndedAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal)this).EndedAt, (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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// state of the maintenance + [System.ComponentModel.TypeConverter(typeof(MaintenanceStateTypeConverter))] + public partial interface IMaintenanceState + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.TypeConverter.cs new file mode 100644 index 000000000000..2a9ac97741df --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceStateTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IMaintenanceState ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceState.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceState.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceState.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/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.cs new file mode 100644 index 000000000000..b27e661bc8af --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// state of the maintenance + public partial class MaintenanceState : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceStateInternal + { + + /// Backing field for property. + private global::System.DateTime? _endedAt; + + /// Time when current state ended + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? EndedAt { get => this._endedAt; set => this._endedAt = value; } + + /// Backing field for property. + private string _message; + + /// Failure/Success info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private string _name; + + /// Customer presentable maintenance state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private global::System.DateTime? _startedAt; + + /// Time when current state started + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? StartedAt { get => this._startedAt; set => this._startedAt = value; } + + /// Creates an new instance. + public MaintenanceState() + { + + } + } + /// state of the maintenance + public partial interface IMaintenanceState : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// Time when current state ended + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Time when current state ended", + SerializedName = @"endedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndedAt { get; set; } + /// Failure/Success info + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Failure/Success info", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Customer presentable maintenance state + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Customer presentable maintenance state", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + string Name { get; set; } + /// Time when current state started + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Time when current state started", + SerializedName = @"startedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartedAt { get; set; } + + } + /// state of the maintenance + internal partial interface IMaintenanceStateInternal + + { + /// Time when current state ended + global::System.DateTime? EndedAt { get; set; } + /// Failure/Success info + string Message { get; set; } + /// Customer presentable maintenance state + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + string Name { get; set; } + /// Time when current state started + global::System.DateTime? StartedAt { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.json.cs new file mode 100644 index 000000000000..5617a85a618a --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/MaintenanceState.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// state of the maintenance + public partial class MaintenanceState + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceState FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new MaintenanceState(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceState(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_startedAt = If( json?.PropertyT("startedAt"), out var __jsonStartedAt) ? global::System.DateTime.TryParse((string)__jsonStartedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartedAtValue) ? __jsonStartedAtValue : _startedAt : _startedAt;} + {_endedAt = If( json?.PropertyT("endedAt"), out var __jsonEndedAt) ? global::System.DateTime.TryParse((string)__jsonEndedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndedAtValue) ? __jsonEndedAtValue : _endedAt : _endedAt;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AddIf( null != this._startedAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._startedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startedAt" ,container.Add ); + AddIf( null != this._endedAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._endedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.PowerShell.cs index c6e6856d7af2..57ff00846cce 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.PowerShell.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.PowerShell.cs @@ -189,6 +189,10 @@ internal PrivateCloud(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IEndpoints) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).Endpoint, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.EndpointsTypeConverter.ConvertFrom); } + if (content.Contains("VcfLicense")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicense = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense) content.GetValueForProperty("VcfLicense",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicense, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicenseTypeConverter.ConvertFrom); + } if (content.Contains("SkuName")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SkuName, global::System.Convert.ToString); @@ -309,6 +313,10 @@ internal PrivateCloud(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).EndpointVcenterIP = (string) content.GetValueForProperty("EndpointVcenterIP",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).EndpointVcenterIP, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseKind = (string) content.GetValueForProperty("VcfLicenseKind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseKind, global::System.Convert.ToString); + } if (content.Contains("IdentityPrincipalId")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).IdentityPrincipalId, global::System.Convert.ToString); @@ -397,6 +405,10 @@ internal PrivateCloud(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId = (string) content.GetValueForProperty("SecondaryCircuitExpressRoutePrivatePeeringId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseProvisioningState = (string) content.GetValueForProperty("VcfLicenseProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseProvisioningState, global::System.Convert.ToString); + } if (content.Contains("KeyVaultPropertyAutoDetectedKeyVersion")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).KeyVaultPropertyAutoDetectedKeyVersion = (string) content.GetValueForProperty("KeyVaultPropertyAutoDetectedKeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).KeyVaultPropertyAutoDetectedKeyVersion, global::System.Convert.ToString); @@ -510,6 +522,10 @@ internal PrivateCloud(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IEndpoints) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).Endpoint, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.EndpointsTypeConverter.ConvertFrom); } + if (content.Contains("VcfLicense")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicense = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense) content.GetValueForProperty("VcfLicense",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicense, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicenseTypeConverter.ConvertFrom); + } if (content.Contains("SkuName")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SkuName, global::System.Convert.ToString); @@ -630,6 +646,10 @@ internal PrivateCloud(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).EndpointVcenterIP = (string) content.GetValueForProperty("EndpointVcenterIP",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).EndpointVcenterIP, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseKind = (string) content.GetValueForProperty("VcfLicenseKind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseKind, global::System.Convert.ToString); + } if (content.Contains("IdentityPrincipalId")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).IdentityPrincipalId, global::System.Convert.ToString); @@ -718,6 +738,10 @@ internal PrivateCloud(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId = (string) content.GetValueForProperty("SecondaryCircuitExpressRoutePrivatePeeringId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseProvisioningState = (string) content.GetValueForProperty("VcfLicenseProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).VcfLicenseProvisioningState, global::System.Convert.ToString); + } if (content.Contains("KeyVaultPropertyAutoDetectedKeyVersion")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).KeyVaultPropertyAutoDetectedKeyVersion = (string) content.GetValueForProperty("KeyVaultPropertyAutoDetectedKeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal)this).KeyVaultPropertyAutoDetectedKeyVersion, global::System.Convert.ToString); diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.cs index 8aa13ff89880..0103e67949be 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloud.cs @@ -294,6 +294,15 @@ public partial class PrivateCloud : /// Internal Acessors for VcenterCertificateThumbprint string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal.VcenterCertificateThumbprint { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcenterCertificateThumbprint; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcenterCertificateThumbprint = value ?? null; } + /// Internal Acessors for VcfLicense + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal.VcfLicense { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicense; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicense = value ?? null /* model class */; } + + /// Internal Acessors for VcfLicenseKind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal.VcfLicenseKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicenseKind; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicenseKind = value ?? null; } + + /// Internal Acessors for VcfLicenseProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal.VcfLicenseProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicenseProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicenseProvisioningState = value ?? null; } + /// Internal Acessors for VmotionNetwork string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudInternal.VmotionNetwork { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VmotionNetwork; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VmotionNetwork = value ?? null; } @@ -474,6 +483,18 @@ public partial class PrivateCloud : [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] public System.Security.SecureString VcenterPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcenterPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcenterPassword = value ?? null; } + /// The private cloud license + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense VcfLicense { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicense; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicense = value ?? null /* model class */; } + + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string VcfLicenseKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicenseKind; } + + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string VcfLicenseProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VcfLicenseProvisioningState; } + /// Azure resource ID of the virtual network [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] public string VirtualNetworkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VirtualNetworkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)Property).VirtualNetworkId = value ?? null; } @@ -1116,6 +1137,29 @@ this privateCloud networkBlock attribute. Make sure the CIDR format conforms to SerializedName = @"vcenterPassword", PossibleTypes = new [] { typeof(System.Security.SecureString) })] System.Security.SecureString VcenterPassword { get; set; } + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = true, + Update = true, + Description = @"License kind", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string VcfLicenseKind { get; } + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The state of the license provisioning", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string VcfLicenseProvisioningState { get; } /// Azure resource ID of the virtual network [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( Required = false, @@ -1317,6 +1361,13 @@ internal partial interface IPrivateCloudInternal : string VcenterCertificateThumbprint { get; set; } /// Optionally, set the vCenter admin password when the private cloud is created System.Security.SecureString VcenterPassword { get; set; } + /// The private cloud license + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense VcfLicense { get; set; } + /// License kind + string VcfLicenseKind { get; set; } + /// The state of the license provisioning + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string VcfLicenseProvisioningState { get; set; } /// Azure resource ID of the virtual network string VirtualNetworkId { get; set; } /// Used for live migration of virtual machines diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.PowerShell.cs index c245c045f69d..96568bf6ce6d 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.PowerShell.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.PowerShell.cs @@ -133,6 +133,10 @@ internal PrivateCloudProperties(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuit = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICircuit) content.GetValueForProperty("SecondaryCircuit",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuit, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.CircuitTypeConverter.ConvertFrom); } + if (content.Contains("VcfLicense")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicense = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense) content.GetValueForProperty("VcfLicense",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicense, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicenseTypeConverter.ConvertFrom); + } if (content.Contains("Internet")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).Internet = (string) content.GetValueForProperty("Internet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).Internet, global::System.Convert.ToString); @@ -225,6 +229,10 @@ internal PrivateCloudProperties(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).EndpointVcenterIP = (string) content.GetValueForProperty("EndpointVcenterIP",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).EndpointVcenterIP, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseKind = (string) content.GetValueForProperty("VcfLicenseKind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseKind, global::System.Convert.ToString); + } if (content.Contains("ManagementClusterSize")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).ManagementClusterSize = (int?) content.GetValueForProperty("ManagementClusterSize",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).ManagementClusterSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -301,6 +309,10 @@ internal PrivateCloudProperties(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId = (string) content.GetValueForProperty("SecondaryCircuitExpressRoutePrivatePeeringId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseProvisioningState = (string) content.GetValueForProperty("VcfLicenseProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseProvisioningState, global::System.Convert.ToString); + } if (content.Contains("KeyVaultPropertyAutoDetectedKeyVersion")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).KeyVaultPropertyAutoDetectedKeyVersion = (string) content.GetValueForProperty("KeyVaultPropertyAutoDetectedKeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).KeyVaultPropertyAutoDetectedKeyVersion, global::System.Convert.ToString); @@ -358,6 +370,10 @@ internal PrivateCloudProperties(global::System.Management.Automation.PSObject co { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuit = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICircuit) content.GetValueForProperty("SecondaryCircuit",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuit, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.CircuitTypeConverter.ConvertFrom); } + if (content.Contains("VcfLicense")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicense = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense) content.GetValueForProperty("VcfLicense",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicense, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicenseTypeConverter.ConvertFrom); + } if (content.Contains("Internet")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).Internet = (string) content.GetValueForProperty("Internet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).Internet, global::System.Convert.ToString); @@ -450,6 +466,10 @@ internal PrivateCloudProperties(global::System.Management.Automation.PSObject co { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).EndpointVcenterIP = (string) content.GetValueForProperty("EndpointVcenterIP",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).EndpointVcenterIP, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseKind = (string) content.GetValueForProperty("VcfLicenseKind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseKind, global::System.Convert.ToString); + } if (content.Contains("ManagementClusterSize")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).ManagementClusterSize = (int?) content.GetValueForProperty("ManagementClusterSize",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).ManagementClusterSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); @@ -526,6 +546,10 @@ internal PrivateCloudProperties(global::System.Management.Automation.PSObject co { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId = (string) content.GetValueForProperty("SecondaryCircuitExpressRoutePrivatePeeringId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).SecondaryCircuitExpressRoutePrivatePeeringId, global::System.Convert.ToString); } + if (content.Contains("VcfLicenseProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseProvisioningState = (string) content.GetValueForProperty("VcfLicenseProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).VcfLicenseProvisioningState, global::System.Convert.ToString); + } if (content.Contains("KeyVaultPropertyAutoDetectedKeyVersion")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).KeyVaultPropertyAutoDetectedKeyVersion = (string) content.GetValueForProperty("KeyVaultPropertyAutoDetectedKeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal)this).KeyVaultPropertyAutoDetectedKeyVersion, global::System.Convert.ToString); diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.cs b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.cs index 0a32712bffc7..f9dc9e76d8df 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.cs @@ -294,6 +294,15 @@ public partial class PrivateCloudProperties : /// Internal Acessors for VcenterCertificateThumbprint string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal.VcenterCertificateThumbprint { get => this._vcenterCertificateThumbprint; set { {_vcenterCertificateThumbprint = value;} } } + /// Internal Acessors for VcfLicense + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal.VcfLicense { get => (this._vcfLicense = this._vcfLicense ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense()); set { {_vcfLicense = value;} } } + + /// Internal Acessors for VcfLicenseKind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal.VcfLicenseKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)VcfLicense).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)VcfLicense).Kind = value ?? null; } + + /// Internal Acessors for VcfLicenseProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal.VcfLicenseProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)VcfLicense).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)VcfLicense).ProvisioningState = value ?? null; } + /// Internal Acessors for VmotionNetwork string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudPropertiesInternal.VmotionNetwork { get => this._vmotionNetwork; set { {_vmotionNetwork = value;} } } @@ -386,6 +395,21 @@ public partial class PrivateCloudProperties : [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] public System.Security.SecureString VcenterPassword { get => this._vcenterPassword; set => this._vcenterPassword = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense _vcfLicense; + + /// The private cloud license + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense VcfLicense { get => (this._vcfLicense = this._vcfLicense ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense()); set => this._vcfLicense = value; } + + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string VcfLicenseKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)VcfLicense).Kind; } + + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inlined)] + public string VcfLicenseProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)VcfLicense).ProvisioningState; } + /// Backing field for property. private string _virtualNetworkId; @@ -910,6 +934,29 @@ this privateCloud networkBlock attribute. Make sure the CIDR format conforms to SerializedName = @"vcenterPassword", PossibleTypes = new [] { typeof(System.Security.SecureString) })] System.Security.SecureString VcenterPassword { get; set; } + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = true, + Update = true, + Description = @"License kind", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string VcfLicenseKind { get; } + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The state of the license provisioning", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string VcfLicenseProvisioningState { get; } /// Azure resource ID of the virtual network [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( Required = false, @@ -1062,6 +1109,13 @@ internal partial interface IPrivateCloudPropertiesInternal string VcenterCertificateThumbprint { get; set; } /// Optionally, set the vCenter admin password when the private cloud is created System.Security.SecureString VcenterPassword { get; set; } + /// The private cloud license + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense VcfLicense { get; set; } + /// License kind + string VcfLicenseKind { get; set; } + /// The state of the license provisioning + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string VcfLicenseProvisioningState { get; set; } /// Azure resource ID of the virtual network string VirtualNetworkId { get; set; } /// Used for live migration of virtual machines diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.json.cs index e277520fbfb4..27c2ef8e7bab 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.json.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/PrivateCloudProperties.json.cs @@ -83,6 +83,7 @@ internal PrivateCloudProperties(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtim {_circuit = If( json?.PropertyT("circuit"), out var __jsonCircuit) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Circuit.FromJson(__jsonCircuit) : _circuit;} {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Endpoints.FromJson(__jsonEndpoints) : _endpoint;} {_secondaryCircuit = If( json?.PropertyT("secondaryCircuit"), out var __jsonSecondaryCircuit) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Circuit.FromJson(__jsonSecondaryCircuit) : _secondaryCircuit;} + {_vcfLicense = If( json?.PropertyT("vcfLicense"), out var __jsonVcfLicense) ? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense.FromJson(__jsonVcfLicense) : _vcfLicense;} {_internet = If( json?.PropertyT("internet"), out var __jsonInternet) ? (string)__jsonInternet : (string)_internet;} {_identitySource = If( json?.PropertyT("identitySources"), out var __jsonIdentitySources) ? If( __jsonIdentitySources as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIdentitySource) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IdentitySource.FromJson(__u) )) ))() : null : _identitySource;} {_extendedNetworkBlock = If( json?.PropertyT("extendedNetworkBlocks"), out var __jsonExtendedNetworkBlocks) ? If( __jsonExtendedNetworkBlocks as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _extendedNetworkBlock;} @@ -133,6 +134,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Mi AddIf( null != this._endpoint ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) this._endpoint.ToJson(null,serializationMode) : null, "endpoints" ,container.Add ); } AddIf( null != this._secondaryCircuit ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) this._secondaryCircuit.ToJson(null,serializationMode) : null, "secondaryCircuit" ,container.Add ); + AddIf( null != this._vcfLicense ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) this._vcfLicense.ToJson(null,serializationMode) : null, "vcfLicense" ,container.Add ); AddIf( null != (((object)this._internet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._internet.ToString()) : null, "internet" ,container.Add ); if (null != this._identitySource) { diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.PowerShell.cs new file mode 100644 index 000000000000..1b1fd583571a --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Constraints for rescheduling maintenance + [System.ComponentModel.TypeConverter(typeof(RescheduleOperationTypeConverter))] + public partial class RescheduleOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RescheduleOperation(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.VMware.Models.IRescheduleOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RescheduleOperation(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.VMware.Models.IRescheduleOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RescheduleOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisabledReason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).DisabledReason = (string) content.GetValueForProperty("DisabledReason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).DisabledReason, global::System.Convert.ToString); + } + if (content.Contains("Constraint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).Constraint = (System.Collections.Generic.List) content.GetValueForProperty("Constraint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).Constraint, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraintTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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 RescheduleOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisabledReason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).DisabledReason = (string) content.GetValueForProperty("DisabledReason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).DisabledReason, global::System.Convert.ToString); + } + if (content.Contains("Constraint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).Constraint = (System.Collections.Generic.List) content.GetValueForProperty("Constraint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal)this).Constraint, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraintTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Constraints for rescheduling maintenance + [System.ComponentModel.TypeConverter(typeof(RescheduleOperationTypeConverter))] + public partial interface IRescheduleOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.TypeConverter.cs new file mode 100644 index 000000000000..8bd4e6e98526 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RescheduleOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IRescheduleOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RescheduleOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RescheduleOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RescheduleOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.cs new file mode 100644 index 000000000000..816844a9614b --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Constraints for rescheduling maintenance + public partial class RescheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation __maintenanceManagementOperation = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation(); + + /// Backing field for property. + private System.Collections.Generic.List _constraint; + + /// Constraints for rescheduling maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Constraint { get => this._constraint; } + + /// Backing field for property. + private string _disabledReason; + + /// Reason for reschedule disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string DisabledReason { get => this._disabledReason; } + + /// Backing field for property. + private bool? _isDisabled; + + /// If rescheduling is disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public bool? IsDisabled { get => this._isDisabled; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "Reschedule"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)__maintenanceManagementOperation).Kind = "Reschedule"; } + + /// Internal Acessors for Constraint + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal.Constraint { get => this._constraint; set { {_constraint = value;} } } + + /// Internal Acessors for DisabledReason + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal.DisabledReason { get => this._disabledReason; set { {_disabledReason = value;} } } + + /// Internal Acessors for IsDisabled + bool? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationInternal.IsDisabled { get => this._isDisabled; set { {_isDisabled = value;} } } + + /// Creates an new instance. + public RescheduleOperation() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__maintenanceManagementOperation), __maintenanceManagementOperation); + await eventListener.AssertObjectIsValid(nameof(__maintenanceManagementOperation), __maintenanceManagementOperation); + } + } + /// Constraints for rescheduling maintenance + public partial interface IRescheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation + { + /// Constraints for rescheduling maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Constraints for rescheduling maintenance", + SerializedName = @"constraints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint),typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileRescheduleOperation),typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileRescheduleOperation) })] + System.Collections.Generic.List Constraint { get; } + /// Reason for reschedule disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Reason for reschedule disabled", + SerializedName = @"disabledReason", + PossibleTypes = new [] { typeof(string) })] + string DisabledReason { get; } + /// If rescheduling is disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"If rescheduling is disabled", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDisabled { get; } + + } + /// Constraints for rescheduling maintenance + internal partial interface IRescheduleOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal + { + /// Constraints for rescheduling maintenance + System.Collections.Generic.List Constraint { get; set; } + /// Reason for reschedule disabled + string DisabledReason { get; set; } + /// If rescheduling is disabled + bool? IsDisabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.json.cs new file mode 100644 index 000000000000..7443e709819d --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperation.json.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Constraints for rescheduling maintenance + public partial class RescheduleOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new RescheduleOperation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal RescheduleOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __maintenanceManagementOperation = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation(json); + {_isDisabled = If( json?.PropertyT("isDisabled"), out var __jsonIsDisabled) ? (bool?)__jsonIsDisabled : _isDisabled;} + {_disabledReason = If( json?.PropertyT("disabledReason"), out var __jsonDisabledReason) ? (string)__jsonDisabledReason : (string)_disabledReason;} + {_constraint = If( json?.PropertyT("constraints"), out var __jsonConstraints) ? If( __jsonConstraints as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.RescheduleOperationConstraint.FromJson(__u) )) ))() : null : _constraint;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __maintenanceManagementOperation?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDisabled ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonBoolean((bool)this._isDisabled) : null, "isDisabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._disabledReason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._disabledReason.ToString()) : null, "disabledReason" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._constraint) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._constraint ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("constraints",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.PowerShell.cs new file mode 100644 index 000000000000..8921380ca941 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Defines constraints for reschedule operation on maintenance + [System.ComponentModel.TypeConverter(typeof(RescheduleOperationConstraintTypeConverter))] + public partial class RescheduleOperationConstraint + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RescheduleOperationConstraint(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.VMware.Models.IRescheduleOperationConstraint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RescheduleOperationConstraint(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.VMware.Models.IRescheduleOperationConstraint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RescheduleOperationConstraint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind, 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 RescheduleOperationConstraint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal)this).Kind, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines constraints for reschedule operation on maintenance + [System.ComponentModel.TypeConverter(typeof(RescheduleOperationConstraintTypeConverter))] + public partial interface IRescheduleOperationConstraint + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.TypeConverter.cs new file mode 100644 index 000000000000..53e957556663 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RescheduleOperationConstraintTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IRescheduleOperationConstraint ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RescheduleOperationConstraint.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RescheduleOperationConstraint.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RescheduleOperationConstraint.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/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.cs new file mode 100644 index 000000000000..af2fd11d0608 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Defines constraints for reschedule operation on maintenance + public partial class RescheduleOperationConstraint : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal + { + + /// Backing field for property. + private string _kind; + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Kind { get => this._kind; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraintInternal.Kind { get => this._kind; set { {_kind = value;} } } + + /// Creates an new instance. + public RescheduleOperationConstraint() + { + + } + } + /// Defines constraints for reschedule operation on maintenance + public partial interface IRescheduleOperationConstraint : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The kind of operation", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("AvailableWindowForMaintenance", "Blocked")] + string Kind { get; } + + } + /// Defines constraints for reschedule operation on maintenance + internal partial interface IRescheduleOperationConstraintInternal + + { + /// The kind of operation + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("AvailableWindowForMaintenance", "Blocked")] + string Kind { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.json.cs new file mode 100644 index 000000000000..59c771aba6cb --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/RescheduleOperationConstraint.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Defines constraints for reschedule operation on maintenance + public partial class RescheduleOperationConstraint + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IRescheduleOperationConstraint FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("kind") ) + { + case "AvailableWindowForMaintenance": + { + return new AvailableWindowForMaintenanceWhileRescheduleOperation(json); + } + case "Blocked": + { + return new BlockedWhileRescheduleOperation(json); + } + } + return new RescheduleOperationConstraint(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal RescheduleOperationConstraint(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.PowerShell.cs new file mode 100644 index 000000000000..82983db32092 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Scheduling window constraint + [System.ComponentModel.TypeConverter(typeof(ScheduleOperationTypeConverter))] + public partial class ScheduleOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScheduleOperation(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.VMware.Models.IScheduleOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScheduleOperation(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.VMware.Models.IScheduleOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScheduleOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisabledReason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).DisabledReason = (string) content.GetValueForProperty("DisabledReason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).DisabledReason, global::System.Convert.ToString); + } + if (content.Contains("Constraint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).Constraint = (System.Collections.Generic.List) content.GetValueForProperty("Constraint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).Constraint, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraintTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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 ScheduleOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisabledReason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).DisabledReason = (string) content.GetValueForProperty("DisabledReason",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).DisabledReason, global::System.Convert.ToString); + } + if (content.Contains("Constraint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).Constraint = (System.Collections.Generic.List) content.GetValueForProperty("Constraint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal)this).Constraint, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraintTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)this).Kind, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Scheduling window constraint + [System.ComponentModel.TypeConverter(typeof(ScheduleOperationTypeConverter))] + public partial interface IScheduleOperation + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.TypeConverter.cs new file mode 100644 index 000000000000..19a482f9606f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduleOperationTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IScheduleOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ScheduleOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ScheduleOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ScheduleOperation.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/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.cs new file mode 100644 index 000000000000..38411f4170d2 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Scheduling window constraint + public partial class ScheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperation, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation __maintenanceManagementOperation = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation(); + + /// Backing field for property. + private System.Collections.Generic.List _constraint; + + /// Constraints for scheduling maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Constraint { get => this._constraint; } + + /// Backing field for property. + private string _disabledReason; + + /// Reason for schedule disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string DisabledReason { get => this._disabledReason; } + + /// Backing field for property. + private bool? _isDisabled; + + /// If scheduling is disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public bool? IsDisabled { get => this._isDisabled; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "Schedule"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal)__maintenanceManagementOperation).Kind = "Schedule"; } + + /// Internal Acessors for Constraint + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal.Constraint { get => this._constraint; set { {_constraint = value;} } } + + /// Internal Acessors for DisabledReason + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal.DisabledReason { get => this._disabledReason; set { {_disabledReason = value;} } } + + /// Internal Acessors for IsDisabled + bool? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationInternal.IsDisabled { get => this._isDisabled; set { {_isDisabled = value;} } } + + /// Creates an new instance. + public ScheduleOperation() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__maintenanceManagementOperation), __maintenanceManagementOperation); + await eventListener.AssertObjectIsValid(nameof(__maintenanceManagementOperation), __maintenanceManagementOperation); + } + } + /// Scheduling window constraint + public partial interface IScheduleOperation : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperation + { + /// Constraints for scheduling maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Constraints for scheduling maintenance", + SerializedName = @"constraints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint),typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAvailableWindowForMaintenanceWhileScheduleOperation),typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IBlockedWhileScheduleOperation) })] + System.Collections.Generic.List Constraint { get; } + /// Reason for schedule disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Reason for schedule disabled", + SerializedName = @"disabledReason", + PossibleTypes = new [] { typeof(string) })] + string DisabledReason { get; } + /// If scheduling is disabled + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"If scheduling is disabled", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDisabled { get; } + + } + /// Scheduling window constraint + internal partial interface IScheduleOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceManagementOperationInternal + { + /// Constraints for scheduling maintenance + System.Collections.Generic.List Constraint { get; set; } + /// Reason for schedule disabled + string DisabledReason { get; set; } + /// If scheduling is disabled + bool? IsDisabled { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.json.cs new file mode 100644 index 000000000000..61e452edf541 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperation.json.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Scheduling window constraint + public partial class ScheduleOperation + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new ScheduleOperation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal ScheduleOperation(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __maintenanceManagementOperation = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceManagementOperation(json); + {_isDisabled = If( json?.PropertyT("isDisabled"), out var __jsonIsDisabled) ? (bool?)__jsonIsDisabled : _isDisabled;} + {_disabledReason = If( json?.PropertyT("disabledReason"), out var __jsonDisabledReason) ? (string)__jsonDisabledReason : (string)_disabledReason;} + {_constraint = If( json?.PropertyT("constraints"), out var __jsonConstraints) ? If( __jsonConstraints as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint.FromJson(__u) )) ))() : null : _constraint;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __maintenanceManagementOperation?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDisabled ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonBoolean((bool)this._isDisabled) : null, "isDisabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._disabledReason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._disabledReason.ToString()) : null, "disabledReason" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._constraint) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._constraint ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("constraints",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.PowerShell.cs new file mode 100644 index 000000000000..cf43c22400da --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Defines constraints for schedule operation on maintenance + [System.ComponentModel.TypeConverter(typeof(ScheduleOperationConstraintTypeConverter))] + public partial class ScheduleOperationConstraint + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScheduleOperationConstraint(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.VMware.Models.IScheduleOperationConstraint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScheduleOperationConstraint(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.VMware.Models.IScheduleOperationConstraint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScheduleOperationConstraint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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 ScheduleOperationConstraint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines constraints for schedule operation on maintenance + [System.ComponentModel.TypeConverter(typeof(ScheduleOperationConstraintTypeConverter))] + public partial interface IScheduleOperationConstraint + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.TypeConverter.cs new file mode 100644 index 000000000000..a50289b37e7e --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduleOperationConstraintTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IScheduleOperationConstraint ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ScheduleOperationConstraint.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ScheduleOperationConstraint.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ScheduleOperationConstraint.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/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.cs new file mode 100644 index 000000000000..e4b5ffb9fab7 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Defines constraints for schedule operation on maintenance + public partial class ScheduleOperationConstraint : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal + { + + /// Backing field for property. + private string _kind; + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Kind { get => this._kind; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal.Kind { get => this._kind; set { {_kind = value;} } } + + /// Creates an new instance. + public ScheduleOperationConstraint() + { + + } + } + /// Defines constraints for schedule operation on maintenance + public partial interface IScheduleOperationConstraint : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The kind of operation", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("SchedulingWindow", "AvailableWindowForMaintenance", "Blocked")] + string Kind { get; } + + } + /// Defines constraints for schedule operation on maintenance + internal partial interface IScheduleOperationConstraintInternal + + { + /// The kind of operation + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("SchedulingWindow", "AvailableWindowForMaintenance", "Blocked")] + string Kind { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.json.cs new file mode 100644 index 000000000000..d19f46c19739 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/ScheduleOperationConstraint.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Defines constraints for schedule operation on maintenance + public partial class ScheduleOperationConstraint + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("kind") ) + { + case "AvailableWindowForMaintenance": + { + return new AvailableWindowForMaintenanceWhileScheduleOperation(json); + } + case "Blocked": + { + return new BlockedWhileScheduleOperation(json); + } + case "SchedulingWindow": + { + return new SchedulingWindow(json); + } + } + return new ScheduleOperationConstraint(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal ScheduleOperationConstraint(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.PowerShell.cs new file mode 100644 index 000000000000..f5b91a777a2b --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// Time window in which Customer has option to schedule maintenance + [System.ComponentModel.TypeConverter(typeof(SchedulingWindowTypeConverter))] + public partial class SchedulingWindow + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindow DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SchedulingWindow(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.VMware.Models.ISchedulingWindow DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SchedulingWindow(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.VMware.Models.ISchedulingWindow FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SchedulingWindow(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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 SchedulingWindow(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).StartsAt = (global::System.DateTime?) content.GetValueForProperty("StartsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).StartsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndsAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).EndsAt = (global::System.DateTime?) content.GetValueForProperty("EndsAt",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal)this).EndsAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)this).Kind, 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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Time window in which Customer has option to schedule maintenance + [System.ComponentModel.TypeConverter(typeof(SchedulingWindowTypeConverter))] + public partial interface ISchedulingWindow + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.TypeConverter.cs new file mode 100644 index 000000000000..df073a1624ef --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SchedulingWindowTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.ISchedulingWindow ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindow).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SchedulingWindow.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SchedulingWindow.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SchedulingWindow.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/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.cs b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.cs new file mode 100644 index 000000000000..6bafe03a63c9 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time window in which Customer has option to schedule maintenance + public partial class SchedulingWindow : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindow, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint __scheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint(); + + /// Backing field for property. + private global::System.DateTime? _endsAt; + + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? EndsAt { get => this._endsAt; } + + /// The kind of operation + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "SchedulingWindow"; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal)__scheduleOperationConstraint).Kind = "SchedulingWindow"; } + + /// Internal Acessors for EndsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal.EndsAt { get => this._endsAt; set { {_endsAt = value;} } } + + /// Internal Acessors for StartsAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindowInternal.StartsAt { get => this._startsAt; set { {_startsAt = value;} } } + + /// Backing field for property. + private global::System.DateTime? _startsAt; + + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime? StartsAt { get => this._startsAt; } + + /// Creates an new instance. + public SchedulingWindow() + { + + } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__scheduleOperationConstraint), __scheduleOperationConstraint); + await eventListener.AssertObjectIsValid(nameof(__scheduleOperationConstraint), __scheduleOperationConstraint); + } + } + /// Time window in which Customer has option to schedule maintenance + public partial interface ISchedulingWindow : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraint + { + /// End date Time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End date Time", + SerializedName = @"endsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndsAt { get; } + /// Start date time + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start date time", + SerializedName = @"startsAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartsAt { get; } + + } + /// Time window in which Customer has option to schedule maintenance + internal partial interface ISchedulingWindowInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScheduleOperationConstraintInternal + { + /// End date Time + global::System.DateTime? EndsAt { get; set; } + /// Start date time + global::System.DateTime? StartsAt { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.json.cs new file mode 100644 index 000000000000..897f693c3afb --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/SchedulingWindow.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// Time window in which Customer has option to schedule maintenance + public partial class SchedulingWindow + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindow. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindow. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISchedulingWindow FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new SchedulingWindow(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal SchedulingWindow(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __scheduleOperationConstraint = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScheduleOperationConstraint(json); + {_startsAt = If( json?.PropertyT("startsAt"), out var __jsonStartsAt) ? global::System.DateTime.TryParse((string)__jsonStartsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartsAtValue) ? __jsonStartsAtValue : _startsAt : _startsAt;} + {_endsAt = If( json?.PropertyT("endsAt"), out var __jsonEndsAt) ? global::System.DateTime.TryParse((string)__jsonEndsAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndsAtValue) ? __jsonEndsAtValue : _endsAt : _endsAt;} + 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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __scheduleOperationConstraint?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._startsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._startsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startsAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._endsAt ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._endsAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endsAt" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.PowerShell.cs index 638eec9fc8ec..52ed342eebc2 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.PowerShell.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.PowerShell.cs @@ -133,6 +133,10 @@ internal VMwareIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).Location, global::System.Convert.ToString); } + if (content.Contains("ServiceComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ServiceComponentName = (string) content.GetValueForProperty("ServiceComponentName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ServiceComponentName, global::System.Convert.ToString); + } if (content.Contains("ResourceGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); @@ -181,6 +185,14 @@ internal VMwareIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).HcxEnterpriseSiteName = (string) content.GetValueForProperty("HcxEnterpriseSiteName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).HcxEnterpriseSiteName, global::System.Convert.ToString); } + if (content.Contains("LicenseName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).LicenseName = (string) content.GetValueForProperty("LicenseName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).LicenseName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).MaintenanceName = (string) content.GetValueForProperty("MaintenanceName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).MaintenanceName, global::System.Convert.ToString); + } if (content.Contains("ProvisionedNetworkName")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ProvisionedNetworkName = (string) content.GetValueForProperty("ProvisionedNetworkName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ProvisionedNetworkName, global::System.Convert.ToString); @@ -262,6 +274,10 @@ internal VMwareIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).Location, global::System.Convert.ToString); } + if (content.Contains("ServiceComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ServiceComponentName = (string) content.GetValueForProperty("ServiceComponentName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ServiceComponentName, global::System.Convert.ToString); + } if (content.Contains("ResourceGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); @@ -310,6 +326,14 @@ internal VMwareIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).HcxEnterpriseSiteName = (string) content.GetValueForProperty("HcxEnterpriseSiteName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).HcxEnterpriseSiteName, global::System.Convert.ToString); } + if (content.Contains("LicenseName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).LicenseName = (string) content.GetValueForProperty("LicenseName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).LicenseName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).MaintenanceName = (string) content.GetValueForProperty("MaintenanceName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).MaintenanceName, global::System.Convert.ToString); + } if (content.Contains("ProvisionedNetworkName")) { ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ProvisionedNetworkName = (string) content.GetValueForProperty("ProvisionedNetworkName",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentityInternal)this).ProvisionedNetworkName, global::System.Convert.ToString); diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.cs index c1f16befaff6..f838bb5e1a60 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.cs @@ -103,6 +103,13 @@ public partial class VMwareIdentity : [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] public string Id { get => this._id; set => this._id = value; } + /// Backing field for property. + private string _licenseName; + + /// Name of the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string LicenseName { get => this._licenseName; set => this._licenseName = value; } + /// Backing field for property. private string _location; @@ -110,6 +117,13 @@ public partial class VMwareIdentity : [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] public string Location { get => this._location; set => this._location = value; } + /// Backing field for property. + private string _maintenanceName; + + /// Name of the maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + /// Backing field for property. private string _placementPolicyName; @@ -180,6 +194,13 @@ public partial class VMwareIdentity : [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] public string SegmentId { get => this._segmentId; set => this._segmentId = value; } + /// Backing field for property. + private string _serviceComponentName; + + /// A service component + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string ServiceComponentName { get => this._serviceComponentName; set => this._serviceComponentName = value; } + /// Backing field for property. private string _storagePolicyName; @@ -360,6 +381,18 @@ public partial interface IVMwareIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } + /// Name of the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the license.", + SerializedName = @"licenseName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VmwareFirewall")] + string LicenseName { get; set; } /// The name of the Azure region. [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( Required = false, @@ -371,6 +404,17 @@ public partial interface IVMwareIdentity : SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] string Location { get; set; } + /// Name of the maintenance + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceName { get; set; } /// Name of the placement policy. [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( Required = false, @@ -481,6 +525,17 @@ public partial interface IVMwareIdentity : SerializedName = @"segmentId", PossibleTypes = new [] { typeof(string) })] string SegmentId { get; set; } + /// A service component + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A service component", + SerializedName = @"serviceComponentName", + PossibleTypes = new [] { typeof(string) })] + string ServiceComponentName { get; set; } /// Name of the storage policy. [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( Required = false, @@ -556,8 +611,13 @@ internal partial interface IVMwareIdentityInternal string HostId { get; set; } /// Resource identity path string Id { get; set; } + /// Name of the license. + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("VmwareFirewall")] + string LicenseName { get; set; } /// The name of the Azure region. string Location { get; set; } + /// Name of the maintenance + string MaintenanceName { get; set; } /// Name of the placement policy. string PlacementPolicyName { get; set; } /// ID of the NSX port mirroring profile. @@ -578,6 +638,8 @@ internal partial interface IVMwareIdentityInternal string ScriptPackageName { get; set; } /// The ID of the NSX Segment string SegmentId { get; set; } + /// A service component + string ServiceComponentName { get; set; } /// Name of the storage policy. string StoragePolicyName { get; set; } /// The ID of the target subscription. The value must be an UUID. diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.json.cs index 334a3119caea..7c07d5a091fd 100644 --- a/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.json.cs +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VMwareIdentity.json.cs @@ -85,6 +85,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Mi } AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != (((object)this._serviceComponentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._serviceComponentName.ToString()) : null, "serviceComponentName" ,container.Add ); AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); AddIf( null != (((object)this._privateCloudName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._privateCloudName.ToString()) : null, "privateCloudName" ,container.Add ); AddIf( null != (((object)this._addonName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._addonName.ToString()) : null, "addonName" ,container.Add ); @@ -97,6 +98,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode ToJson(Mi AddIf( null != (((object)this._virtualMachineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._virtualMachineId.ToString()) : null, "virtualMachineId" ,container.Add ); AddIf( null != (((object)this._globalReachConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._globalReachConnectionName.ToString()) : null, "globalReachConnectionName" ,container.Add ); AddIf( null != (((object)this._hcxEnterpriseSiteName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._hcxEnterpriseSiteName.ToString()) : null, "hcxEnterpriseSiteName" ,container.Add ); + AddIf( null != (((object)this._licenseName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._licenseName.ToString()) : null, "licenseName" ,container.Add ); + AddIf( null != (((object)this._maintenanceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._maintenanceName.ToString()) : null, "maintenanceName" ,container.Add ); AddIf( null != (((object)this._provisionedNetworkName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._provisionedNetworkName.ToString()) : null, "provisionedNetworkName" ,container.Add ); AddIf( null != (((object)this._storagePolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._storagePolicyName.ToString()) : null, "storagePolicyName" ,container.Add ); AddIf( null != (((object)this._scriptExecutionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._scriptExecutionName.ToString()) : null, "scriptExecutionName" ,container.Add ); @@ -129,6 +132,7 @@ internal VMwareIdentity(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.J } {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + {_serviceComponentName = If( json?.PropertyT("serviceComponentName"), out var __jsonServiceComponentName) ? (string)__jsonServiceComponentName : (string)_serviceComponentName;} {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} {_privateCloudName = If( json?.PropertyT("privateCloudName"), out var __jsonPrivateCloudName) ? (string)__jsonPrivateCloudName : (string)_privateCloudName;} {_addonName = If( json?.PropertyT("addonName"), out var __jsonAddonName) ? (string)__jsonAddonName : (string)_addonName;} @@ -141,6 +145,8 @@ internal VMwareIdentity(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.J {_virtualMachineId = If( json?.PropertyT("virtualMachineId"), out var __jsonVirtualMachineId) ? (string)__jsonVirtualMachineId : (string)_virtualMachineId;} {_globalReachConnectionName = If( json?.PropertyT("globalReachConnectionName"), out var __jsonGlobalReachConnectionName) ? (string)__jsonGlobalReachConnectionName : (string)_globalReachConnectionName;} {_hcxEnterpriseSiteName = If( json?.PropertyT("hcxEnterpriseSiteName"), out var __jsonHcxEnterpriseSiteName) ? (string)__jsonHcxEnterpriseSiteName : (string)_hcxEnterpriseSiteName;} + {_licenseName = If( json?.PropertyT("licenseName"), out var __jsonLicenseName) ? (string)__jsonLicenseName : (string)_licenseName;} + {_maintenanceName = If( json?.PropertyT("maintenanceName"), out var __jsonMaintenanceName) ? (string)__jsonMaintenanceName : (string)_maintenanceName;} {_provisionedNetworkName = If( json?.PropertyT("provisionedNetworkName"), out var __jsonProvisionedNetworkName) ? (string)__jsonProvisionedNetworkName : (string)_provisionedNetworkName;} {_storagePolicyName = If( json?.PropertyT("storagePolicyName"), out var __jsonStoragePolicyName) ? (string)__jsonStoragePolicyName : (string)_storagePolicyName;} {_scriptExecutionName = If( json?.PropertyT("scriptExecutionName"), out var __jsonScriptExecutionName) ? (string)__jsonScriptExecutionName : (string)_scriptExecutionName;} diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.PowerShell.cs new file mode 100644 index 000000000000..9e3726c4c51b --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// A VMware Cloud Foundation (VCF) 5.0 license + [System.ComponentModel.TypeConverter(typeof(Vcf5LicenseTypeConverter))] + public partial class Vcf5License + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5License DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Vcf5License(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.VMware.Models.IVcf5License DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Vcf5License(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.VMware.Models.IVcf5License FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Vcf5License(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LicenseKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).LicenseKey = (System.Security.SecureString) content.GetValueForProperty("LicenseKey",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).LicenseKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("Core")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Core = (int) content.GetValueForProperty("Core",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Core, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).EndDate = (global::System.DateTime) content.GetValueForProperty("EndDate",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).EndDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("BroadcomSiteId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomSiteId = (string) content.GetValueForProperty("BroadcomSiteId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomSiteId, global::System.Convert.ToString); + } + if (content.Contains("BroadcomContractNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomContractNumber = (string) content.GetValueForProperty("BroadcomContractNumber",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomContractNumber, global::System.Convert.ToString); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Label = (System.Collections.Generic.List) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Label, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LabelTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Vcf5License(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LicenseKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).LicenseKey = (System.Security.SecureString) content.GetValueForProperty("LicenseKey",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).LicenseKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("Core")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Core = (int) content.GetValueForProperty("Core",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Core, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).EndDate = (global::System.DateTime) content.GetValueForProperty("EndDate",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).EndDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("BroadcomSiteId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomSiteId = (string) content.GetValueForProperty("BroadcomSiteId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomSiteId, global::System.Convert.ToString); + } + if (content.Contains("BroadcomContractNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomContractNumber = (string) content.GetValueForProperty("BroadcomContractNumber",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).BroadcomContractNumber, global::System.Convert.ToString); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Label = (System.Collections.Generic.List) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal)this).Label, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LabelTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// A VMware Cloud Foundation (VCF) 5.0 license + [System.ComponentModel.TypeConverter(typeof(Vcf5LicenseTypeConverter))] + public partial interface IVcf5License + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.TypeConverter.cs new file mode 100644 index 000000000000..b0117b47cba2 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class Vcf5LicenseTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IVcf5License ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5License).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Vcf5License.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Vcf5License.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Vcf5License.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/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.cs new file mode 100644 index 000000000000..f7470dd4b710 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A VMware Cloud Foundation (VCF) 5.0 license + public partial class Vcf5License : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5License, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5LicenseInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense __vcfLicense = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense(); + + /// Backing field for property. + private string _broadcomContractNumber; + + /// The Broadcom contract number associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string BroadcomContractNumber { get => this._broadcomContractNumber; set => this._broadcomContractNumber = value; } + + /// Backing field for property. + private string _broadcomSiteId; + + /// The Broadcom site ID associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string BroadcomSiteId { get => this._broadcomSiteId; set => this._broadcomSiteId = value; } + + /// Backing field for property. + private int _core; + + /// Number of cores included in the license + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public int Core { get => this._core; set => this._core = value; } + + /// Backing field for property. + private global::System.DateTime _endDate; + + /// UTC datetime when the license expires + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime EndDate { get => this._endDate; set => this._endDate = value; } + + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "vcf5"; } + + /// Backing field for property. + private System.Collections.Generic.List _label; + + /// Additional labels passed through for license reporting. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Label { get => this._label; set => this._label = value; } + + /// Backing field for property. + private System.Security.SecureString _licenseKey; + + /// License key + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Security.SecureString LicenseKey { get => this._licenseKey; set => this._licenseKey = value; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal.Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)__vcfLicense).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)__vcfLicense).Kind = value ; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)__vcfLicense).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)__vcfLicense).ProvisioningState = value ?? null; } + + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)__vcfLicense).ProvisioningState; } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__vcfLicense), __vcfLicense); + await eventListener.AssertObjectIsValid(nameof(__vcfLicense), __vcfLicense); + } + + /// Creates an new instance. + public Vcf5License() + { + + } + } + /// A VMware Cloud Foundation (VCF) 5.0 license + public partial interface IVcf5License : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense + { + /// The Broadcom contract number associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Broadcom contract number associated with the license.", + SerializedName = @"broadcomContractNumber", + PossibleTypes = new [] { typeof(string) })] + string BroadcomContractNumber { get; set; } + /// The Broadcom site ID associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Broadcom site ID associated with the license.", + SerializedName = @"broadcomSiteId", + PossibleTypes = new [] { typeof(string) })] + string BroadcomSiteId { get; set; } + /// Number of cores included in the license + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number of cores included in the license", + SerializedName = @"cores", + PossibleTypes = new [] { typeof(int) })] + int Core { get; set; } + /// UTC datetime when the license expires + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"UTC datetime when the license expires", + SerializedName = @"endDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime EndDate { get; set; } + /// Additional labels passed through for license reporting. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Additional labels passed through for license reporting.", + SerializedName = @"labels", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel) })] + System.Collections.Generic.List Label { get; set; } + /// License key + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"License key", + SerializedName = @"licenseKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString LicenseKey { get; set; } + + } + /// A VMware Cloud Foundation (VCF) 5.0 license + internal partial interface IVcf5LicenseInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal + { + /// The Broadcom contract number associated with the license. + string BroadcomContractNumber { get; set; } + /// The Broadcom site ID associated with the license. + string BroadcomSiteId { get; set; } + /// Number of cores included in the license + int Core { get; set; } + /// UTC datetime when the license expires + global::System.DateTime EndDate { get; set; } + /// Additional labels passed through for license reporting. + System.Collections.Generic.List Label { get; set; } + /// License key + System.Security.SecureString LicenseKey { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.json.cs new file mode 100644 index 000000000000..13d6d1efc5d7 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/Vcf5License.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A VMware Cloud Foundation (VCF) 5.0 license + public partial class Vcf5License + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5License. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5License. + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcf5License FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new Vcf5License(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __vcfLicense?.ToJson(container, serializationMode); + AddIf( null != (((object)this._licenseKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._licenseKey))) : null, "licenseKey" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNumber(this._core), "cores" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._endDate.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "endDate" ,container.Add ); + AddIf( null != (((object)this._broadcomSiteId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._broadcomSiteId.ToString()) : null, "broadcomSiteId" ,container.Add ); + AddIf( null != (((object)this._broadcomContractNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._broadcomContractNumber.ToString()) : null, "broadcomContractNumber" ,container.Add ); + if (null != this._label) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._label ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("labels",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal Vcf5License(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __vcfLicense = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense(json); + {_licenseKey = If( json?.PropertyT("licenseKey"), out var __jsonLicenseKey) ? new System.Net.NetworkCredential("",(string)__jsonLicenseKey).SecurePassword : _licenseKey;} + {_core = If( json?.PropertyT("cores"), out var __jsonCores) ? (int)__jsonCores : _core;} + {_endDate = If( json?.PropertyT("endDate"), out var __jsonEndDate) ? global::System.DateTime.TryParse((string)__jsonEndDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndDateValue) ? __jsonEndDateValue : _endDate : _endDate;} + {_broadcomSiteId = If( json?.PropertyT("broadcomSiteId"), out var __jsonBroadcomSiteId) ? (string)__jsonBroadcomSiteId : (string)_broadcomSiteId;} + {_broadcomContractNumber = If( json?.PropertyT("broadcomContractNumber"), out var __jsonBroadcomContractNumber) ? (string)__jsonBroadcomContractNumber : (string)_broadcomContractNumber;} + {_label = If( json?.PropertyT("labels"), out var __jsonLabels) ? If( __jsonLabels as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Label.FromJson(__u) )) ))() : null : _label;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.PowerShell.cs new file mode 100644 index 000000000000..73ff102c051f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// A VMware Cloud Foundation license + [System.ComponentModel.TypeConverter(typeof(VcfLicenseTypeConverter))] + public partial class VcfLicense + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VcfLicense(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.VMware.Models.IVcfLicense DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VcfLicense(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.VMware.Models.IVcfLicense FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VcfLicense(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VcfLicense(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// A VMware Cloud Foundation license + [System.ComponentModel.TypeConverter(typeof(VcfLicenseTypeConverter))] + public partial interface IVcfLicense + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.TypeConverter.cs new file mode 100644 index 000000000000..739e4a76657c --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VcfLicenseTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IVcfLicense ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VcfLicense.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VcfLicense.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VcfLicense.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/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.cs new file mode 100644 index 000000000000..e7e4bee3cecd --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A VMware Cloud Foundation license + public partial class VcfLicense : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal + { + + /// Backing field for property. + private string _kind= @"vcf5"; + + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string Kind { get => this._kind; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal.Kind { get => this._kind; set { {_kind = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicenseInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public VcfLicense() + { + + } + } + /// A VMware Cloud Foundation license + public partial interface IVcfLicense : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable + { + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = true, + Update = true, + Description = @"License kind", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string Kind { get; } + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The state of the license provisioning", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + + } + /// A VMware Cloud Foundation license + internal partial interface IVcfLicenseInternal + + { + /// License kind + string Kind { get; set; } + /// The state of the license provisioning + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.json.cs new file mode 100644 index 000000000000..f479d73c757a --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VcfLicense.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// A VMware Cloud Foundation license + public partial class VcfLicense + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense interface is polymorphic, and the precise model + /// class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense. + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("kind") ) + { + case "vcf5": + { + return new Vcf5License(json); + } + } + return new VcfLicense(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal VcfLicense(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)_kind;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.PowerShell.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.PowerShell.cs new file mode 100644 index 000000000000..3920a6196a70 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// The properties of a VMware Firewall license + [System.ComponentModel.TypeConverter(typeof(VmwareFirewallLicensePropertiesTypeConverter))] + public partial class VmwareFirewallLicenseProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicenseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VmwareFirewallLicenseProperties(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.VMware.Models.IVmwareFirewallLicenseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VmwareFirewallLicenseProperties(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.VMware.Models.IVmwareFirewallLicenseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VmwareFirewallLicenseProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LicenseKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).LicenseKey = (System.Security.SecureString) content.GetValueForProperty("LicenseKey",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).LicenseKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("Core")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Core = (int) content.GetValueForProperty("Core",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Core, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).EndDate = (global::System.DateTime) content.GetValueForProperty("EndDate",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).EndDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("BroadcomSiteId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomSiteId = (string) content.GetValueForProperty("BroadcomSiteId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomSiteId, global::System.Convert.ToString); + } + if (content.Contains("BroadcomContractNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomContractNumber = (string) content.GetValueForProperty("BroadcomContractNumber",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomContractNumber, global::System.Convert.ToString); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Label = (System.Collections.Generic.List) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Label, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LabelTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VmwareFirewallLicenseProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LicenseKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).LicenseKey = (System.Security.SecureString) content.GetValueForProperty("LicenseKey",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).LicenseKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("Core")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Core = (int) content.GetValueForProperty("Core",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Core, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).EndDate = (global::System.DateTime) content.GetValueForProperty("EndDate",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).EndDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("BroadcomSiteId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomSiteId = (string) content.GetValueForProperty("BroadcomSiteId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomSiteId, global::System.Convert.ToString); + } + if (content.Contains("BroadcomContractNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomContractNumber = (string) content.GetValueForProperty("BroadcomContractNumber",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).BroadcomContractNumber, global::System.Convert.ToString); + } + if (content.Contains("Label")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Label = (System.Collections.Generic.List) content.GetValueForProperty("Label",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal)this).Label, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LabelTypeConverter.ConvertFrom)); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The properties of a VMware Firewall license + [System.ComponentModel.TypeConverter(typeof(VmwareFirewallLicensePropertiesTypeConverter))] + public partial interface IVmwareFirewallLicenseProperties + + { + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.TypeConverter.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.TypeConverter.cs new file mode 100644 index 000000000000..c8d30d9892ca --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.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.VMware.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VmwareFirewallLicensePropertiesTypeConverter : 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.VMware.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IVmwareFirewallLicenseProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicenseProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VmwareFirewallLicenseProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VmwareFirewallLicenseProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VmwareFirewallLicenseProperties.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/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.cs new file mode 100644 index 000000000000..e7fac18d5109 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The properties of a VMware Firewall license + public partial class VmwareFirewallLicenseProperties : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicenseProperties, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicensePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties __licenseProperties = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties(); + + /// Backing field for property. + private string _broadcomContractNumber; + + /// The Broadcom contract number associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string BroadcomContractNumber { get => this._broadcomContractNumber; set => this._broadcomContractNumber = value; } + + /// Backing field for property. + private string _broadcomSiteId; + + /// The Broadcom site ID associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public string BroadcomSiteId { get => this._broadcomSiteId; set => this._broadcomSiteId = value; } + + /// Backing field for property. + private int _core; + + /// Number of cores included in the license, measured per hour + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public int Core { get => this._core; set => this._core = value; } + + /// Backing field for property. + private global::System.DateTime _endDate; + + /// UTC datetime when the license expires + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public global::System.DateTime EndDate { get => this._endDate; set => this._endDate = value; } + + /// License kind + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string Kind { get => "VmwareFirewall"; } + + /// Backing field for property. + private System.Collections.Generic.List _label; + + /// Additional labels passed through for license reporting. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Collections.Generic.List Label { get => this._label; set => this._label = value; } + + /// Backing field for property. + private System.Security.SecureString _licenseKey; + + /// License key + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Owned)] + public System.Security.SecureString LicenseKey { get => this._licenseKey; set => this._licenseKey = value; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal.Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)__licenseProperties).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)__licenseProperties).Kind = value ; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)__licenseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)__licenseProperties).ProvisioningState = value ?? null; } + + /// The state of the license provisioning + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Origin(Microsoft.Azure.PowerShell.Cmdlets.VMware.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal)__licenseProperties).ProvisioningState; } + + /// 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.VMware.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__licenseProperties), __licenseProperties); + await eventListener.AssertObjectIsValid(nameof(__licenseProperties), __licenseProperties); + } + + /// Creates an new instance. + public VmwareFirewallLicenseProperties() + { + + } + } + /// The properties of a VMware Firewall license + public partial interface IVmwareFirewallLicenseProperties : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties + { + /// The Broadcom contract number associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Broadcom contract number associated with the license.", + SerializedName = @"broadcomContractNumber", + PossibleTypes = new [] { typeof(string) })] + string BroadcomContractNumber { get; set; } + /// The Broadcom site ID associated with the license. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Broadcom site ID associated with the license.", + SerializedName = @"broadcomSiteId", + PossibleTypes = new [] { typeof(string) })] + string BroadcomSiteId { get; set; } + /// Number of cores included in the license, measured per hour + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number of cores included in the license, measured per hour", + SerializedName = @"cores", + PossibleTypes = new [] { typeof(int) })] + int Core { get; set; } + /// UTC datetime when the license expires + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"UTC datetime when the license expires", + SerializedName = @"endDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime EndDate { get; set; } + /// Additional labels passed through for license reporting. + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Additional labels passed through for license reporting.", + SerializedName = @"labels", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel) })] + System.Collections.Generic.List Label { get; set; } + /// License key + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"License key", + SerializedName = @"licenseKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString LicenseKey { get; set; } + + } + /// The properties of a VMware Firewall license + internal partial interface IVmwareFirewallLicensePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicensePropertiesInternal + { + /// The Broadcom contract number associated with the license. + string BroadcomContractNumber { get; set; } + /// The Broadcom site ID associated with the license. + string BroadcomSiteId { get; set; } + /// Number of cores included in the license, measured per hour + int Core { get; set; } + /// UTC datetime when the license expires + global::System.DateTime EndDate { get; set; } + /// Additional labels passed through for license reporting. + System.Collections.Generic.List Label { get; set; } + /// License key + System.Security.SecureString LicenseKey { get; set; } + + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.json.cs b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.json.cs new file mode 100644 index 000000000000..425ec146f896 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/api/Models/VmwareFirewallLicenseProperties.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.VMware.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + + /// The properties of a VMware Firewall license + public partial class VmwareFirewallLicenseProperties + { + + /// + /// 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.VMware.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.VMware.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.VMware.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.VMware.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicenseProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicenseProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVmwareFirewallLicenseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json ? new VmwareFirewallLicenseProperties(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.VMware.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __licenseProperties?.ToJson(container, serializationMode); + AddIf( null != (((object)this._licenseKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._licenseKey))) : null, "licenseKey" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNumber(this._core), "cores" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._endDate.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "endDate" ,container.Add ); + AddIf( null != (((object)this._broadcomSiteId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._broadcomSiteId.ToString()) : null, "broadcomSiteId" ,container.Add ); + AddIf( null != (((object)this._broadcomContractNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonString(this._broadcomContractNumber.ToString()) : null, "broadcomContractNumber" ,container.Add ); + if (null != this._label) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.XNodeArray(); + foreach( var __x in this._label ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("labels",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject instance to deserialize from. + internal VmwareFirewallLicenseProperties(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __licenseProperties = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties(json); + {_licenseKey = If( json?.PropertyT("licenseKey"), out var __jsonLicenseKey) ? new System.Net.NetworkCredential("",(string)__jsonLicenseKey).SecurePassword : _licenseKey;} + {_core = If( json?.PropertyT("cores"), out var __jsonCores) ? (int)__jsonCores : _core;} + {_endDate = If( json?.PropertyT("endDate"), out var __jsonEndDate) ? global::System.DateTime.TryParse((string)__jsonEndDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndDateValue) ? __jsonEndDateValue : _endDate : _endDate;} + {_broadcomSiteId = If( json?.PropertyT("broadcomSiteId"), out var __jsonBroadcomSiteId) ? (string)__jsonBroadcomSiteId : (string)_broadcomSiteId;} + {_broadcomContractNumber = If( json?.PropertyT("broadcomContractNumber"), out var __jsonBroadcomContractNumber) ? (string)__jsonBroadcomContractNumber : (string)_broadcomContractNumber;} + {_label = If( json?.PropertyT("labels"), out var __jsonLabels) ? If( __jsonLabels as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel) (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Label.FromJson(__u) )) ))() : null : _label;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/api/VMware.cs b/generated/VMware/VMware.Autorest/generated/api/VMware.cs index d3579088dcc3..d9e384c90f11 100644 --- a/generated/VMware/VMware.Autorest/generated/api/VMware.cs +++ b/generated/VMware/VMware.Autorest/generated/api/VMware.cs @@ -31,7 +31,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string addonName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -80,7 +80,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -140,7 +140,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -203,7 +203,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string addonName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -579,7 +579,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string addonName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -623,7 +623,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -860,7 +860,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsGet(string subscriptionId, string resourceGroupName, string privateCloudName, string addonName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -903,7 +903,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -957,7 +957,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1014,7 +1014,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string addonName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1197,7 +1197,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1239,7 +1239,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1291,7 +1291,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1345,7 +1345,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AddonsListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1527,7 +1527,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string authorizationName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1576,7 +1576,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1636,7 +1636,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1699,7 +1699,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string authorizationName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2077,7 +2077,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string authorizationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2121,7 +2121,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2358,7 +2358,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsGet(string subscriptionId, string resourceGroupName, string privateCloudName, string authorizationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2401,7 +2401,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2455,7 +2455,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2512,7 +2512,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string authorizationName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2695,7 +2695,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2737,7 +2737,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2789,7 +2789,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2843,7 +2843,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task AuthorizationsListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3025,7 +3025,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string cloudLinkName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3074,7 +3074,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3134,7 +3134,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3197,7 +3197,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string cloudLinkName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3573,7 +3573,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string cloudLinkName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3617,7 +3617,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3854,7 +3854,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksGet(string subscriptionId, string resourceGroupName, string privateCloudName, string cloudLinkName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3897,7 +3897,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3951,7 +3951,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4008,7 +4008,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string cloudLinkName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4191,7 +4191,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4233,7 +4233,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4285,7 +4285,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4339,7 +4339,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task CloudLinksListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4521,7 +4521,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4570,7 +4570,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4630,7 +4630,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4693,7 +4693,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5069,7 +5069,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5113,7 +5113,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5350,7 +5350,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersGet(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5393,7 +5393,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5447,7 +5447,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5504,7 +5504,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5687,7 +5687,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5729,7 +5729,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5781,7 +5781,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5835,7 +5835,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5940,7 +5940,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersListZones(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5984,7 +5984,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersListZonesViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6039,7 +6039,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersListZonesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6097,7 +6097,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersListZonesWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6359,7 +6359,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6408,7 +6408,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6468,7 +6468,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IClusterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6531,7 +6531,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ClustersUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IClusterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6911,7 +6911,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string datastoreName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6962,7 +6962,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7025,7 +7025,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7092,7 +7092,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string datastoreName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7474,7 +7474,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string datastoreName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7520,7 +7520,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7764,7 +7764,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresGet(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string datastoreName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7809,7 +7809,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7866,7 +7866,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7927,7 +7927,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string datastoreName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8116,7 +8116,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresList(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8160,7 +8160,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8215,7 +8215,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8273,7 +8273,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task DatastoresListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8460,7 +8460,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string globalReachConnectionName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8509,7 +8509,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8569,7 +8569,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8632,7 +8632,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string globalReachConnectionName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9012,7 +9012,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string globalReachConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9056,7 +9056,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9293,7 +9293,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsGet(string subscriptionId, string resourceGroupName, string privateCloudName, string globalReachConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9336,7 +9336,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9390,7 +9390,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9447,7 +9447,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string globalReachConnectionName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9632,7 +9632,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9674,7 +9674,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9726,7 +9726,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9780,7 +9780,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task GlobalReachConnectionsListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9965,7 +9965,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHcxEnterpriseSite body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10015,7 +10015,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHcxEnterpriseSite body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10075,7 +10075,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHcxEnterpriseSite body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10138,7 +10138,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHcxEnterpriseSite body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10345,7 +10345,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10389,7 +10389,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10533,7 +10533,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesGet(string subscriptionId, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10576,7 +10576,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10630,7 +10630,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10687,7 +10687,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string hcxEnterpriseSiteName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10870,7 +10870,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10912,7 +10912,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10964,7 +10964,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11018,7 +11018,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HcxEnterpriseSitesListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11199,7 +11199,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsGet(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string hostId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11244,7 +11244,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11301,7 +11301,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11362,7 +11362,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string hostId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11551,7 +11551,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsList(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11595,7 +11595,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11650,7 +11650,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11708,7 +11708,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task HostsListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11894,7 +11894,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11942,7 +11942,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12000,7 +12000,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12060,7 +12060,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12431,7 +12431,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsDelete(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12474,7 +12474,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12705,7 +12705,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsGet(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12747,7 +12747,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12799,7 +12799,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12853,7 +12853,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13032,7 +13032,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsListByPrivateCloud(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13074,7 +13074,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsListByPrivateCloudViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13126,7 +13126,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsListByPrivateCloudViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13180,7 +13180,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task IscsiPathsListByPrivateCloudWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13347,9 +13347,3175 @@ public partial class VMware } } + /// update a License + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LicensesCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var licenseName = @"VmwareFirewall"; + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses/" + + global::System.Uri.EscapeDataString(licenseName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a License + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LicensesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var licenseName = _match.Groups["licenseName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses/" + + licenseName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a License + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LicensesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var licenseName = _match.Groups["licenseName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses/" + + licenseName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a License + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LicensesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var licenseName = @"VmwareFirewall"; + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses/" + + global::System.Uri.EscapeDataString(licenseName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesCreateOrUpdate_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LicensesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a License + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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.VMware.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 LicensesDelete(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var licenseName = @"VmwareFirewall"; + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses/" + + global::System.Uri.EscapeDataString(licenseName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a License + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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.VMware.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 LicensesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var licenseName = _match.Groups["licenseName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses/" + + licenseName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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.VMware.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 LicensesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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 LicensesDelete_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + } + } + + /// Get a License + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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.VMware.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 LicensesGet(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var licenseName = @"VmwareFirewall"; + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses/" + + global::System.Uri.EscapeDataString(licenseName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Just like ArmResourceActionSync, but with no request body. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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.VMware.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 LicensesGetProperties(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var licenseName = @"VmwareFirewall"; + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses/" + + global::System.Uri.EscapeDataString(licenseName) + + "/getProperties" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesGetProperties_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Just like ArmResourceActionSync, but with no request body. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetPropertiesViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var licenseName = _match.Groups["licenseName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses/" + + licenseName + + "/getProperties" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesGetProperties_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Just like ArmResourceActionSync, but with no request body. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetPropertiesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var licenseName = _match.Groups["licenseName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses/" + + licenseName + + "/getProperties" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesGetPropertiesWithResult_Call (request, eventListener,sender); + } + } + + /// Just like ArmResourceActionSync, but with no request body. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetPropertiesWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var licenseName = @"VmwareFirewall"; + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses/" + + global::System.Uri.EscapeDataString(licenseName) + + "/getProperties" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesGetPropertiesWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetPropertiesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetProperties_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseProperties.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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 LicensesGetProperties_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + } + } + + /// Get a License + /// + /// 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.VMware.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 LicensesGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var licenseName = _match.Groups["licenseName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses/" + + licenseName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a License + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var licenseName = _match.Groups["licenseName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses/" + + licenseName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a License + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var licenseName = @"VmwareFirewall"; + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses/" + + global::System.Uri.EscapeDataString(licenseName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesGet_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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 LicensesGet_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + } + } + + /// List License resources by PrivateCloud + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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.VMware.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 LicensesList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List License resources by PrivateCloud + /// + /// 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.VMware.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 LicensesListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses$", 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.AVS/privateClouds/{privateCloudName}/licenses'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LicensesList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List License resources by PrivateCloud + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/licenses$", 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.AVS/privateClouds/{privateCloudName}/licenses'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/licenses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesListWithResult_Call (request, eventListener,sender); + } + } + + /// List License resources by PrivateCloud + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/licenses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LicensesListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LicensesList_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.LicenseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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 LicensesList_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + } + } + + /// Return quota for subscription by region + /// The ID of the target subscription. The value must be an UUID. + /// 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.VMware.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 LocationsCheckQuotaAvailability(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AVS/locations/" + + global::System.Uri.EscapeDataString(location) + + "/checkQuotaAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LocationsCheckQuotaAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Return quota for subscription by 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.VMware.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 LocationsCheckQuotaAvailabilityViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + } + + // 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.AVS/locations/" + + location + + "/checkQuotaAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LocationsCheckQuotaAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Return quota for subscription by region + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LocationsCheckQuotaAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + } + + // 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.AVS/locations/" + + location + + "/checkQuotaAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LocationsCheckQuotaAvailabilityWithResult_Call (request, eventListener,sender); + } + } + /// Return quota for subscription by region /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LocationsCheckQuotaAvailabilityWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AVS/locations/" + + global::System.Uri.EscapeDataString(location) + + "/checkQuotaAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LocationsCheckQuotaAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LocationsCheckQuotaAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Quota.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LocationsCheckQuotaAvailability_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Quota.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the 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 LocationsCheckQuotaAvailability_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Return trial status for subscription by region + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Optionally, check for a specific SKU + /// 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.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailability(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AVS/locations/" + + global::System.Uri.EscapeDataString(location) + + "/checkTrialAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LocationsCheckTrialAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Return trial status for subscription by region + /// + /// Optionally, check for a specific SKU + /// 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.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + } + + // 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.AVS/locations/" + + location + + "/checkTrialAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LocationsCheckTrialAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Return trial status for subscription by region + /// + /// Optionally, check for a specific SKU + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + } + + // 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.AVS/locations/" + + location + + "/checkTrialAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LocationsCheckTrialAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Return trial status for subscription by region + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Optionally, check for a specific SKU + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailabilityWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AVS/locations/" + + global::System.Uri.EscapeDataString(location) + + "/checkTrialAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.LocationsCheckTrialAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LocationsCheckTrialAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Trial.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 LocationsCheckTrialAvailability_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Trial.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Optionally, check for a specific SKU + /// 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 LocationsCheckTrialAvailability_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a Maintenance + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// 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.VMware.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 MaintenancesGet(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MaintenancesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Maintenance + /// + /// 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.VMware.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 MaintenancesGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MaintenancesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a Maintenance + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MaintenancesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a Maintenance + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MaintenancesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesGet_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// 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 MaintenancesGet_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + await eventListener.AssertNotNull(nameof(maintenanceName),maintenanceName); + await eventListener.AssertRegEx(nameof(maintenanceName), maintenanceName, @"^[-\w\._]+$"); + } + } + + /// Initiate maintenance readiness checks + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// 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.VMware.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 MaintenancesInitiateChecks(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "/initiateChecks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MaintenancesInitiateChecks_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Initiate maintenance readiness checks + /// + /// 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.VMware.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 MaintenancesInitiateChecksViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "/initiateChecks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MaintenancesInitiateChecks_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Initiate maintenance readiness checks + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesInitiateChecksViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "/initiateChecks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MaintenancesInitiateChecksWithResult_Call (request, eventListener,sender); + } + } + + /// Initiate maintenance readiness checks + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesInitiateChecksWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "/initiateChecks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MaintenancesInitiateChecksWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesInitiateChecksWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesInitiateChecks_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// 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 MaintenancesInitiateChecks_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + await eventListener.AssertNotNull(nameof(maintenanceName),maintenanceName); + await eventListener.AssertRegEx(nameof(maintenanceName), maintenanceName, @"^[-\w\._]+$"); + } + } + + /// List Maintenance resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Filter maintenances based on state + /// Filter active or inactive maintenances + /// date from which result should be returned. ie. scheduledStartTime >= from + /// date till which result should be returned. i.e. scheduledStartTime <= to /// 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). @@ -13358,9 +16524,9 @@ public partial class VMware /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckQuotaAvailability(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenancesList(string subscriptionId, string resourceGroupName, string privateCloudName, string stateName, string status, global::System.DateTime? from, global::System.DateTime? to, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13368,9 +16534,393 @@ public partial class VMware var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.AVS/locations/" - + global::System.Uri.EscapeDataString(location) - + "/checkQuotaAvailability" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(stateName) ? global::System.String.Empty : "stateName=" + global::System.Uri.EscapeDataString(stateName)) + + "&" + + (string.IsNullOrEmpty(status) ? global::System.String.Empty : "status=" + global::System.Uri.EscapeDataString(status)) + + "&" + + (null == from ? global::System.String.Empty : "from=" + from?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + + "&" + + (null == to ? global::System.String.Empty : "to=" + to?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MaintenancesList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Maintenance resources by subscription ID + /// + /// Filter maintenances based on state + /// Filter active or inactive maintenances + /// date from which result should be returned. ie. scheduledStartTime >= from + /// date till which result should be returned. i.e. scheduledStartTime <= to + /// 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.VMware.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 MaintenancesListViaIdentity(global::System.String viaIdentity, string stateName, string status, global::System.DateTime? from, global::System.DateTime? to, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances$", 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.AVS/privateClouds/{privateCloudName}/maintenances'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(stateName) ? global::System.String.Empty : "stateName=" + global::System.Uri.EscapeDataString(stateName)) + + "&" + + (string.IsNullOrEmpty(status) ? global::System.String.Empty : "status=" + global::System.Uri.EscapeDataString(status)) + + "&" + + (null == from ? global::System.String.Empty : "from=" + from?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + + "&" + + (null == to ? global::System.String.Empty : "to=" + to?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MaintenancesList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Maintenance resources by subscription ID + /// + /// Filter maintenances based on state + /// Filter active or inactive maintenances + /// date from which result should be returned. ie. scheduledStartTime >= from + /// date till which result should be returned. i.e. scheduledStartTime <= to + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesListViaIdentityWithResult(global::System.String viaIdentity, string stateName, string status, global::System.DateTime? from, global::System.DateTime? to, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances$", 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.AVS/privateClouds/{privateCloudName}/maintenances'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(stateName) ? global::System.String.Empty : "stateName=" + global::System.Uri.EscapeDataString(stateName)) + + "&" + + (string.IsNullOrEmpty(status) ? global::System.String.Empty : "status=" + global::System.Uri.EscapeDataString(status)) + + "&" + + (null == from ? global::System.String.Empty : "from=" + from?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + + "&" + + (null == to ? global::System.String.Empty : "to=" + to?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MaintenancesListWithResult_Call (request, eventListener,sender); + } + } + + /// List Maintenance resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Filter maintenances based on state + /// Filter active or inactive maintenances + /// date from which result should be returned. ie. scheduledStartTime >= from + /// date till which result should be returned. i.e. scheduledStartTime <= to + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string stateName, string status, global::System.DateTime? from, global::System.DateTime? to, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(stateName) ? global::System.String.Empty : "stateName=" + global::System.Uri.EscapeDataString(stateName)) + + "&" + + (string.IsNullOrEmpty(status) ? global::System.String.Empty : "status=" + global::System.Uri.EscapeDataString(status)) + + "&" + + (null == from ? global::System.String.Empty : "from=" + from?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + + "&" + + (null == to ? global::System.String.Empty : "to=" + to?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.MaintenancesListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 MaintenancesList_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Filter maintenances based on state + /// Filter active or inactive maintenances + /// date from which result should be returned. ie. scheduledStartTime >= from + /// date till which result should be returned. i.e. scheduledStartTime <= to + /// 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 MaintenancesList_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, string stateName, string status, global::System.DateTime? from, global::System.DateTime? to, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + await eventListener.AssertNotNull(nameof(stateName),stateName); + await eventListener.AssertNotNull(nameof(status),status); + } + } + + /// Reschedule a maintenance + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// The content of the action request + /// 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.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MaintenancesReschedule(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "/reschedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13383,45 +16933,57 @@ public partial class VMware await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.LocationsCheckQuotaAvailability_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenancesReschedule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Return quota for subscription by region + /// Reschedule a maintenance /// + /// The content of the action request /// 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.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckQuotaAvailabilityViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenancesRescheduleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var location = _match.Groups["location"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.AVS/locations/" - + location - + "/checkQuotaAvailability" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "/reschedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13434,43 +16996,55 @@ public partial class VMware await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.LocationsCheckQuotaAvailability_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenancesReschedule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Return quota for subscription by region + /// Reschedule a maintenance /// + /// The content of the action request /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckQuotaAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenancesRescheduleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var location = _match.Groups["location"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.AVS/locations/" - + location - + "/checkQuotaAvailability" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "/reschedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13483,23 +17057,31 @@ public partial class VMware await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.LocationsCheckQuotaAvailabilityWithResult_Call (request, eventListener,sender); + return await this.MaintenancesRescheduleWithResult_Call (request, eventListener,sender); } } - /// Return quota for subscription by region + /// Reschedule a maintenance /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// The content of the action request /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckQuotaAvailabilityWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MaintenancesRescheduleWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13507,9 +17089,13 @@ public partial class VMware var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.AVS/locations/" - + global::System.Uri.EscapeDataString(location) - + "/checkQuotaAvailability" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "/reschedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13522,22 +17108,24 @@ public partial class VMware await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.LocationsCheckQuotaAvailabilityWithResult_Call (request, eventListener,sender); + return await this.MaintenancesRescheduleWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will - /// be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task LocationsCheckQuotaAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenancesRescheduleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13556,7 +17144,7 @@ public partial class VMware case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Quota.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -13589,7 +17177,7 @@ public partial class VMware } } - /// 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 @@ -13599,7 +17187,7 @@ public partial class VMware /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task LocationsCheckQuotaAvailability_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenancesReschedule_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13618,7 +17206,7 @@ public partial class VMware case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Quota.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -13640,30 +17228,42 @@ public partial class VMware } /// - /// 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. /// /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// The content of the action request /// 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 LocationsCheckQuotaAvailability_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MaintenancesReschedule_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(location),location); - await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + await eventListener.AssertNotNull(nameof(maintenanceName),maintenanceName); + await eventListener.AssertRegEx(nameof(maintenanceName), maintenanceName, @"^[-\w\._]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Return trial status for subscription by region + /// Schedule a maintenance /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. - /// Optionally, check for a specific SKU + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// The content of the action request /// 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). @@ -13673,9 +17273,9 @@ public partial class VMware /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailability(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MaintenancesSchedule(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13683,9 +17283,13 @@ public partial class VMware var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.AVS/locations/" - + global::System.Uri.EscapeDataString(location) - + "/checkTrialAvailability" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "/schedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13703,13 +17307,13 @@ public partial class VMware request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.LocationsCheckTrialAvailability_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenancesSchedule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Return trial status for subscription by region + /// Schedule a maintenance /// - /// Optionally, check for a specific SKU + /// The content of the action request /// 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). @@ -13719,30 +17323,36 @@ public partial class VMware /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MaintenancesScheduleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var location = _match.Groups["location"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.AVS/locations/" - + location - + "/checkTrialAvailability" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "/schedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13760,44 +17370,50 @@ public partial class VMware request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.LocationsCheckTrialAvailability_Call (request, onOk,onDefault,eventListener,sender); + await this.MaintenancesSchedule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Return trial status for subscription by region + /// Schedule a maintenance /// - /// Optionally, check for a specific SKU + /// The content of the action request /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MaintenancesScheduleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)/maintenances/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var location = _match.Groups["location"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + var maintenanceName = _match.Groups["maintenanceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.AVS/locations/" - + location - + "/checkTrialAvailability" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/maintenances/" + + maintenanceName + + "/schedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13815,24 +17431,26 @@ public partial class VMware request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.LocationsCheckTrialAvailabilityWithResult_Call (request, eventListener,sender); + return await this.MaintenancesScheduleWithResult_Call (request, eventListener,sender); } } - /// Return trial status for subscription by region + /// Schedule a maintenance /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. - /// Optionally, check for a specific SKU + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// The content of the action request /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will - /// be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocationsCheckTrialAvailabilityWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task MaintenancesScheduleWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13840,9 +17458,13 @@ public partial class VMware var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.AVS/locations/" - + global::System.Uri.EscapeDataString(location) - + "/checkTrialAvailability" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/maintenances/" + + global::System.Uri.EscapeDataString(maintenanceName) + + "/schedule" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -13860,21 +17482,19 @@ public partial class VMware request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.LocationsCheckTrialAvailabilityWithResult_Call (request, eventListener,sender); + return await this.MaintenancesScheduleWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will - /// be complete when handling of the response is completed. + /// A that + /// will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task LocationsCheckTrialAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenancesScheduleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13893,7 +17513,7 @@ public partial class VMware case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Trial.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -13926,7 +17546,7 @@ public partial class VMware } } - /// 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 @@ -13936,7 +17556,7 @@ public partial class VMware /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task LocationsCheckTrialAvailability_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MaintenancesSchedule_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13955,7 +17575,7 @@ public partial class VMware case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Trial.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Maintenance.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -13977,24 +17597,31 @@ public partial class VMware } /// - /// 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. /// /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. - /// Optionally, check for a specific SKU + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// Name of the maintenance + /// The content of the action request /// 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 LocationsCheckTrialAvailability_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ISku body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MaintenancesSchedule_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, string maintenanceName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(location),location); - await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + await eventListener.AssertNotNull(nameof(maintenanceName),maintenanceName); + await eventListener.AssertRegEx(nameof(maintenanceName), maintenanceName, @"^[-\w\._]+$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -14011,7 +17638,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14047,7 +17674,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14090,7 +17717,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14132,7 +17759,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14300,7 +17927,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string placementPolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14351,7 +17978,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14414,7 +18041,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14481,7 +18108,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string placementPolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14865,7 +18492,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string placementPolicyName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14911,7 +18538,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15155,7 +18782,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesGet(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string placementPolicyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15200,7 +18827,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15257,7 +18884,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15318,7 +18945,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string placementPolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15507,7 +19134,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesList(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15551,7 +19178,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15606,7 +19233,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15664,7 +19291,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15852,7 +19479,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string placementPolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15903,7 +19530,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15966,7 +19593,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16033,7 +19660,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PlacementPoliciesUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string placementPolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16416,7 +20043,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16463,7 +20090,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16520,7 +20147,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16579,7 +20206,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16951,7 +20578,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsDelete(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16993,7 +20620,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17185,8 +20812,380 @@ public partial class VMware } /// - /// 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. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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 PrivateCloudsDelete_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(privateCloudName),privateCloudName); + await eventListener.AssertRegEx(nameof(privateCloudName), privateCloudName, @"^[-\w\._]+$"); + } + } + + /// Get a PrivateCloud + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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.VMware.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 PrivateCloudsGet(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateCloudsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get the license for the private cloud + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// 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.VMware.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 PrivateCloudsGetVcfLicense(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/getVcfLicense" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateCloudsGetVcfLicense_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get the license for the private cloud + /// + /// 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.VMware.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 PrivateCloudsGetVcfLicenseViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/getVcfLicense" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateCloudsGetVcfLicense_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get the license for the private cloud + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 PrivateCloudsGetVcfLicenseViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AVS/privateClouds/(?[^/]+)$", 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.AVS/privateClouds/{privateCloudName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var privateCloudName = _match.Groups["privateCloudName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AVS/privateClouds/" + + privateCloudName + + "/getVcfLicense" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateCloudsGetVcfLicenseWithResult_Call (request, eventListener,sender); + } + } + + /// Get the license for the private cloud + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the private cloud + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 PrivateCloudsGetVcfLicenseWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AVS/privateClouds/" + + global::System.Uri.EscapeDataString(privateCloudName) + + "/getVcfLicense" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateCloudsGetVcfLicenseWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 PrivateCloudsGetVcfLicenseWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.VMware.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 PrivateCloudsGetVcfLicense_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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VcfLicense.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. @@ -17195,7 +21194,7 @@ public partial class VMware /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateCloudsDelete_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateCloudsGetVcfLicense_Validate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -17209,49 +21208,6 @@ public partial class VMware } } - /// Get a PrivateCloud - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the private cloud - /// 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.VMware.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 PrivateCloudsGet(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-09-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AVS/privateClouds/" - + global::System.Uri.EscapeDataString(privateCloudName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateCloudsGet_Call (request, onOk,onDefault,eventListener,sender); - } - } - /// Get a PrivateCloud /// /// a delegate that is called when the remote service returns 200 (OK). @@ -17264,7 +21220,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17315,7 +21271,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17368,7 +21324,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17545,7 +21501,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsList(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17587,7 +21543,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListAdminCredentials(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17629,7 +21585,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListAdminCredentialsViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17681,7 +21637,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListAdminCredentialsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17735,7 +21691,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListAdminCredentialsWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17914,7 +21870,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListInSubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17952,7 +21908,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListInSubscriptionViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17998,7 +21954,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListInSubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18044,7 +22000,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListInSubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18212,7 +22168,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18261,7 +22217,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18311,7 +22267,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsListWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18486,7 +22442,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsRotateNsxtPassword(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18529,7 +22485,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsRotateNsxtPasswordViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18761,7 +22717,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsRotateVcenterPassword(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18804,7 +22760,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsRotateVcenterPasswordViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19037,7 +22993,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19084,7 +23040,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19141,7 +23097,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19200,7 +23156,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PrivateCloudsUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloudUpdate body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19572,7 +23528,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksGet(string subscriptionId, string resourceGroupName, string privateCloudName, string provisionedNetworkName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19615,7 +23571,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19669,7 +23625,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19726,7 +23682,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string provisionedNetworkName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19909,7 +23865,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19951,7 +23907,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20003,7 +23959,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20057,7 +24013,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ProvisionedNetworksListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20239,7 +24195,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string storagePolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20288,7 +24244,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20348,7 +24304,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20411,7 +24367,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string storagePolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20789,7 +24745,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string storagePolicyName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20833,7 +24789,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21070,7 +25026,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesGet(string subscriptionId, string resourceGroupName, string privateCloudName, string storagePolicyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21113,7 +25069,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21167,7 +25123,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21224,7 +25180,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string storagePolicyName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21407,7 +25363,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21449,7 +25405,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21501,7 +25457,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21555,7 +25511,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task PureStoragePoliciesListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21736,7 +25692,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsGet(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptPackageName, string scriptCmdletName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21781,7 +25737,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21838,7 +25794,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21899,7 +25855,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptPackageName, string scriptCmdletName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22088,7 +26044,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsList(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptPackageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22132,7 +26088,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22187,7 +26143,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22245,7 +26201,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptCmdletsListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptPackageName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22432,7 +26388,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptExecutionName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22481,7 +26437,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22541,7 +26497,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22604,7 +26560,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptExecutionName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22982,7 +26938,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsDelete(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptExecutionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23026,7 +26982,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsDeleteViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23263,7 +27219,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGet(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptExecutionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23312,7 +27268,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGetExecutionLogs(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptExecutionName, System.Collections.Generic.List body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23363,7 +27319,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGetExecutionLogsViaIdentity(global::System.String viaIdentity, System.Collections.Generic.List body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23425,7 +27381,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGetExecutionLogsViaIdentityWithResult(global::System.String viaIdentity, System.Collections.Generic.List body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23490,7 +27446,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGetExecutionLogsWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptExecutionName, System.Collections.Generic.List body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23680,7 +27636,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23734,7 +27690,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23791,7 +27747,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptExecutionName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23974,7 +27930,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24016,7 +27972,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24068,7 +28024,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24122,7 +28078,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptExecutionsListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24302,7 +28258,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesGet(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptPackageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24345,7 +28301,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24399,7 +28355,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24456,7 +28412,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string scriptPackageName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24639,7 +28595,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24681,7 +28637,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24733,7 +28689,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24787,7 +28743,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task ScriptPackagesListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24952,6 +28908,271 @@ public partial class VMware } } + /// Return service component availability + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// A service component + /// 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.VMware.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 ServiceComponentsCheckAvailability(string subscriptionId, string location, string serviceComponentName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AVS/locations/" + + global::System.Uri.EscapeDataString(location) + + "/serviceComponents/" + + global::System.Uri.EscapeDataString(serviceComponentName) + + "/checkAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ServiceComponentsCheckAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Return service component availability + /// + /// 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.VMware.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 ServiceComponentsCheckAvailabilityViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AVS/locations/(?[^/]+)/serviceComponents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var serviceComponentName = _match.Groups["serviceComponentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.AVS/locations/" + + location + + "/serviceComponents/" + + serviceComponentName + + "/checkAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ServiceComponentsCheckAvailability_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.VMware.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 ServiceComponentsCheckAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// A service component + /// 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 ServiceComponentsCheckAvailability_Validate(string subscriptionId, string location, string serviceComponentName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(serviceComponentName),serviceComponentName); + await eventListener.AssertRegEx(nameof(serviceComponentName), serviceComponentName, @"^[-\w\._]+$"); + } + } + /// A list of SKUs. /// The ID of the target subscription. The value must be an UUID. /// a delegate that is called when the remote service returns 200 (OK). @@ -24964,7 +29185,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task SkusList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25002,7 +29223,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task SkusListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25048,7 +29269,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task SkusListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25094,7 +29315,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task SkusListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25264,7 +29485,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesGet(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string virtualMachineId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25309,7 +29530,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25366,7 +29587,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25427,7 +29648,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string virtualMachineId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25616,7 +29837,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesList(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25660,7 +29881,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25715,7 +29936,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25773,7 +29994,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25961,7 +30182,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesRestrictMovement(string subscriptionId, string resourceGroupName, string privateCloudName, string clusterName, string virtualMachineId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachineRestrictMovement body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26013,7 +30234,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task VirtualMachinesRestrictMovementViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachineRestrictMovement body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26259,7 +30480,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26308,7 +30529,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDhcpViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26368,7 +30589,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDhcpViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26431,7 +30652,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDhcpWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26810,7 +31031,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26859,7 +31080,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsServiceViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26919,7 +31140,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsServiceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -26982,7 +31203,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsServiceWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -27361,7 +31582,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -27410,7 +31631,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsZoneViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -27470,7 +31691,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsZoneViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -27533,7 +31754,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateDnsZoneWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -27912,7 +32133,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -27961,7 +32182,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePortMirroringViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -28021,7 +32242,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePortMirroringViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -28084,7 +32305,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePortMirroringWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -28465,7 +32686,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -28514,7 +32735,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePublicIPViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -28574,7 +32795,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePublicIPViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -28637,7 +32858,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreatePublicIPWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29016,7 +33237,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateSegments(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29065,7 +33286,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateSegmentsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29125,7 +33346,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateSegmentsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29188,7 +33409,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateSegmentsWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29567,7 +33788,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateVMGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29616,7 +33837,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateVMGroupViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29676,7 +33897,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateVMGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -29739,7 +33960,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksCreateVMGroupWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -30117,7 +34338,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -30161,7 +34382,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteDhcpViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -30399,7 +34620,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteDnsService(string subscriptionId, string resourceGroupName, string dnsServiceId, string privateCloudName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -30443,7 +34664,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteDnsServiceViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -30681,7 +34902,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteDnsZone(string subscriptionId, string resourceGroupName, string dnsZoneId, string privateCloudName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -30725,7 +34946,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteDnsZoneViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -30963,7 +35184,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeletePortMirroring(string subscriptionId, string resourceGroupName, string portMirroringId, string privateCloudName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -31007,7 +35228,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeletePortMirroringViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -31247,7 +35468,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeletePublicIP(string subscriptionId, string resourceGroupName, string publicIPId, string privateCloudName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -31291,7 +35512,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeletePublicIPViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -31529,7 +35750,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteSegment(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -31573,7 +35794,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteSegmentViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -31811,7 +36032,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteVMGroup(string subscriptionId, string resourceGroupName, string vmGroupId, string privateCloudName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -31855,7 +36076,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksDeleteVMGroupViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32091,7 +36312,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGet(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32136,7 +36357,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDhcp(string subscriptionId, string resourceGroupName, string dhcpId, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32179,7 +36400,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDhcpViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32233,7 +36454,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDhcpViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32290,7 +36511,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDhcpWithResult(string subscriptionId, string resourceGroupName, string dhcpId, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32474,7 +36695,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32517,7 +36738,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsServiceViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32571,7 +36792,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsServiceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32628,7 +36849,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsServiceWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32814,7 +37035,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32857,7 +37078,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsZoneViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32911,7 +37132,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsZoneViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -32968,7 +37189,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetDnsZoneWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33154,7 +37375,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetGateway(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33197,7 +37418,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetGatewayViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33251,7 +37472,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetGatewayViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33308,7 +37529,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetGatewayWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string gatewayId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33494,7 +37715,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33537,7 +37758,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPortMirroringViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33591,7 +37812,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPortMirroringViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33648,7 +37869,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPortMirroringWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33834,7 +38055,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPublicIP(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33877,7 +38098,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPublicIPViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33931,7 +38152,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPublicIPViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -33988,7 +38209,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetPublicIPWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string publicIPId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34174,7 +38395,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetSegment(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34217,7 +38438,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetSegmentViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34271,7 +38492,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetSegmentViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34328,7 +38549,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetSegmentWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34514,7 +38735,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVMGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34557,7 +38778,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVMGroupViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34611,7 +38832,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVMGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34668,7 +38889,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVMGroupWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34851,7 +39072,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34903,7 +39124,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -34960,7 +39181,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVirtualMachine(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35003,7 +39224,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVirtualMachineViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35057,7 +39278,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVirtualMachineViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35114,7 +39335,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetVirtualMachineWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string virtualMachineId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35297,7 +39518,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksGetWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35476,7 +39697,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksList(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35520,7 +39741,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35562,7 +39783,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDhcpViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35614,7 +39835,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDhcpViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35668,7 +39889,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDhcpWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35847,7 +40068,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsServices(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35889,7 +40110,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsServicesViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35941,7 +40162,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsServicesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -35995,7 +40216,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsServicesWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36176,7 +40397,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsZones(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36218,7 +40439,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsZonesViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36270,7 +40491,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsZonesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36324,7 +40545,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListDnsZonesWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36505,7 +40726,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListGateways(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36547,7 +40768,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListGatewaysViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36599,7 +40820,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListGatewaysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36653,7 +40874,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListGatewaysWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36834,7 +41055,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36876,7 +41097,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPortMirroringViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36928,7 +41149,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPortMirroringViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -36982,7 +41203,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPortMirroringWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37163,7 +41384,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPublicIPs(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37205,7 +41426,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPublicIPsViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37257,7 +41478,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPublicIPsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37311,7 +41532,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListPublicIPsWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37492,7 +41713,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListSegments(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37534,7 +41755,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListSegmentsViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37586,7 +41807,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListSegmentsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37640,7 +41861,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListSegmentsWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37821,7 +42042,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVMGroups(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37863,7 +42084,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVMGroupsViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37915,7 +42136,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVMGroupsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -37969,7 +42190,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVMGroupsWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38148,7 +42369,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38200,7 +42421,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38256,7 +42477,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVirtualMachines(string subscriptionId, string resourceGroupName, string privateCloudName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38298,7 +42519,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVirtualMachinesViaIdentity(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.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38350,7 +42571,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVirtualMachinesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38404,7 +42625,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListVirtualMachinesWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38585,7 +42806,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksListWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38767,7 +42988,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDhcp(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38816,7 +43037,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDhcpViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38876,7 +43097,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDhcpViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -38939,7 +43160,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDhcpWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dhcpId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39320,7 +43541,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsService(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39369,7 +43590,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsServiceViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39429,7 +43650,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsServiceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39492,7 +43713,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsServiceWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsServiceId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39873,7 +44094,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsZone(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39922,7 +44143,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsZoneViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -39982,7 +44203,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsZoneViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -40045,7 +44266,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateDnsZoneWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string dnsZoneId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -40426,7 +44647,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdatePortMirroring(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -40475,7 +44696,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdatePortMirroringViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -40535,7 +44756,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdatePortMirroringViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -40598,7 +44819,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdatePortMirroringWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string portMirroringId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -40981,7 +45202,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateSegments(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -41030,7 +45251,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateSegmentsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -41090,7 +45311,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateSegmentsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -41153,7 +45374,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateSegmentsWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string segmentId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -41534,7 +45755,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateVMGroup(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -41583,7 +45804,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateVMGroupViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -41643,7 +45864,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateVMGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -41706,7 +45927,7 @@ public partial class VMware /// public async global::System.Threading.Tasks.Task WorkloadNetworksUpdateVMGroupWithResult(string subscriptionId, string resourceGroupName, string privateCloudName, string vmGroupId, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup body, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2024-09-01"; + var apiVersion = @"2025-09-01"; // Constant Parameters using( NoSynchronizationContext ) { diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_Get.cs index a05ef8acf48f..5f5d1fee8040 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAddon_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentity.cs index ed59f47e39db..34d101f58af7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAddon_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentityPrivateCloud.cs index 19fb01ed2b31..47b12bdd2c47 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAddon_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_List.cs index d19c4ca7fd69..441f47bdc6f1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAddon_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List Addon resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAddon_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_Get.cs index 5a36478b10c2..1c5c1f38355b 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAuthorization_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentity.cs index b2b8caac6d7b..57e2d9b3ed25 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAuthorization_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentityPrivateCloud.cs index 9a9d42d8c5ad..48807ed6261c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAuthorization_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_List.cs index 8cdcdbea2d06..4307a24958de 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareAuthorization_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List ExpressRouteAuthorization resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations", ApiVersion = "2025-09-01")] public partial class GetAzVMwareAuthorization_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_Get.cs index 8d1b8ca125f1..0b43f122d8d5 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCloudLink_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentity.cs index c95fd6d7b247..2f32dc2a10f7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCloudLink_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentityPrivateCloud.cs index 51cbc83783cf..5f687225f48c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCloudLink_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_List.cs index ab5079d0a890..2372676cc6b7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCloudLink_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List CloudLink resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCloudLink_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareClusterZone_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareClusterZone_List.cs index 4b4e56af7a4a..1592970d1de1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareClusterZone_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareClusterZone_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IClusterZoneList))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List hosts by zone in a cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones", ApiVersion = "2025-09-01")] public partial class GetAzVMwareClusterZone_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_Get.cs index cb629b7b94f2..124c5a49679e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCluster_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentity.cs index 79e1dc6114dc..b94de48249d5 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCluster_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentityPrivateCloud.cs index 3568119cc0a7..05ad6c58d0b2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCluster_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_List.cs index d39a80930c63..3527d4120677 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareCluster_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List Cluster resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters", ApiVersion = "2025-09-01")] public partial class GetAzVMwareCluster_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_Get.cs index db2621cc4fd5..518e2fe8f688 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareDatastore_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentity.cs index ea95a4608fb1..8230b1255dfb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareDatastore_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityCluster.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityCluster.cs index f6a7a40c953d..dc2a019654a5 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityCluster.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareDatastore_GetViaIdentityCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityPrivateCloud.cs index 8ccc82602dbb..681aec2ea661 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareDatastore_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_List.cs index d436b46a2b01..0ccc14fac384 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareDatastore_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List Datastore resources by Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores", ApiVersion = "2025-09-01")] public partial class GetAzVMwareDatastore_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_Get.cs index 7cc9f77edb27..3965d3890d13 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareGlobalReachConnection_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentity.cs index 9899610c06fc..1dac8c863da6 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareGlobalReachConnection_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentityPrivateCloud.cs index bbe89f510277..bb979ce2f3cb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareGlobalReachConnection_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_List.cs index a25e1c036843..f90d0ff57bf0 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareGlobalReachConnection_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List GlobalReachConnection resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections", ApiVersion = "2025-09-01")] public partial class GetAzVMwareGlobalReachConnection_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_Get.cs index 451b7f2c6236..b6cc8f658bf5 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHost))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Host")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareHost_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentity.cs index 8d0856440b9c..9705ca1858a1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHost))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Host")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareHost_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityCluster.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityCluster.cs index f3c2ecdd0baf..5e150e8017ae 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityCluster.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHost))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Host")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareHost_GetViaIdentityCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityPrivateCloud.cs index 2ea0bd906536..840ad99d7f82 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHost))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Host")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareHost_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_List.cs index e4bf3a95d3b0..4369bb280cad 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareHost_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IHost))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List Host resources by Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts", ApiVersion = "2025-09-01")] public partial class GetAzVMwareHost_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_Get.cs index 1d31b29102ab..087ad8f079b7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a IscsiPath")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2025-09-01")] public partial class GetAzVMwareIscsiPath_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_GetViaIdentity.cs index 296af72aee17..dc550c7946e3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a IscsiPath")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2025-09-01")] public partial class GetAzVMwareIscsiPath_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_List.cs index fc75a0b1230b..328872ecdee7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareIscsiPath_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List IscsiPath resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths", ApiVersion = "2025-09-01")] public partial class GetAzVMwareIscsiPath_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_Get.cs new file mode 100644 index 000000000000..9ac7f716243f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_Get.cs @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Just like ArmResourceActionSync, but with no request body. + /// + /// [OpenAPI] GetProperties=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareLicenseProperty_Get", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Just like ArmResourceActionSync, but with no request body.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareLicenseProperty_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareLicenseProperty_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesGetProperties' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LicensesGetProperties(SubscriptionId, ResourceGroupName, PrivateCloudName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties + /// 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.VMware.Models.ILicenseProperties + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_GetViaIdentity.cs new file mode 100644 index 000000000000..a67c80a44656 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicenseProperty_GetViaIdentity.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Just like ArmResourceActionSync, but with no request body. + /// + /// [OpenAPI] GetProperties=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareLicenseProperty_GetViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Just like ArmResourceActionSync, but with no request body.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}/getProperties", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareLicenseProperty_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareLicenseProperty_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesGetProperties' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LicensesGetPropertiesViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LicensesGetProperties(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseProperties + /// 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.VMware.Models.ILicenseProperties + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_Get.cs new file mode 100644 index 000000000000..041d6f200d6f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_Get.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Get a License + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareLicense_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareLicense_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareLicense_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LicensesGet(SubscriptionId, ResourceGroupName, PrivateCloudName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Models.ILicense + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_GetViaIdentity.cs new file mode 100644 index 000000000000..4edb7f285cdb --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Get a License + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareLicense_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareLicense_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareLicense_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LicensesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LicensesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Models.ILicense + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_List.cs new file mode 100644 index 000000000000..c2e93bc6c97f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareLicense_List.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// List License resources by PrivateCloud + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareLicense_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List License resources by PrivateCloud")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareLicense_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareLicense_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LicensesList(SubscriptionId, ResourceGroupName, PrivateCloudName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicenseListResult + /// 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.VMware.Models.ILicenseListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LicensesList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_Get.cs new file mode 100644 index 000000000000..0c0329e5f1db --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_Get.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Get a Maintenance + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareMaintenance_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareMaintenance_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("MaintenanceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareMaintenance_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesGet(SubscriptionId, ResourceGroupName, PrivateCloudName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentity.cs new file mode 100644 index 000000000000..1c9f0b2b5d19 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Get a Maintenance + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareMaintenance_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareMaintenance_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareMaintenance_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.MaintenancesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.MaintenanceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MaintenanceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenancesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, InputObject.MaintenanceName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentityPrivateCloud.cs new file mode 100644 index 000000000000..2ab176e56115 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_GetViaIdentityPrivateCloud.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Get a Maintenance + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareMaintenance_GetViaIdentityPrivateCloud")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a Maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareMaintenance_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("MaintenanceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _privateCloudInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity PrivateCloudInputObject { get => this._privateCloudInputObject; set => this._privateCloudInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareMaintenance_GetViaIdentityPrivateCloud() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PrivateCloudInputObject?.Id != null) + { + this.PrivateCloudInputObject.Id += $"/maintenances/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.MaintenancesGetViaIdentity(PrivateCloudInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PrivateCloudInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + await this.Client.MaintenancesGet(PrivateCloudInputObject.SubscriptionId ?? null, PrivateCloudInputObject.ResourceGroupName ?? null, PrivateCloudInputObject.PrivateCloudName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_List.cs new file mode 100644 index 000000000000..61592f1188d4 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareMaintenance_List.cs @@ -0,0 +1,592 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// List Maintenance resources by subscription ID + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwareMaintenance_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List Maintenance resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances", ApiVersion = "2025-09-01")] + public partial class GetAzVMwareMaintenance_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private global::System.DateTime _from; + + /// date from which result should be returned. ie. scheduledStartTime >= from + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "date from which result should be returned. ie. scheduledStartTime >= from")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"date from which result should be returned. ie. scheduledStartTime >= from", + SerializedName = @"from", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Query)] + public global::System.DateTime From { get => this._from; set => this._from = 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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _stateName; + + /// Filter maintenances based on state + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter maintenances based on state")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter maintenances based on state", + SerializedName = @"stateName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Query)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("NotScheduled", "Scheduled", "InProgress", "Success", "Failed", "Canceled")] + public string StateName { get => this._stateName; set => this._stateName = value; } + + /// Backing field for property. + private string _status; + + /// Filter active or inactive maintenances + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filter active or inactive maintenances")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filter active or inactive maintenances", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Query)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.PSArgumentCompleterAttribute("Active", "Inactive")] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private global::System.DateTime _to; + + /// date till which result should be returned. i.e. scheduledStartTime <= to + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "date till which result should be returned. i.e. scheduledStartTime <= to")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"date till which result should be returned. i.e. scheduledStartTime <= to", + SerializedName = @"to", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Query)] + public global::System.DateTime To { get => this._to; set => this._to = 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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwareMaintenance_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesList(SubscriptionId, ResourceGroupName, PrivateCloudName, this.InvocationInformation.BoundParameters.ContainsKey("StateName") ? StateName : null, this.InvocationInformation.BoundParameters.ContainsKey("Status") ? Status : null, this.InvocationInformation.BoundParameters.ContainsKey("From") ? From : default(global::System.DateTime?), this.InvocationInformation.BoundParameters.ContainsKey("To") ? To : default(global::System.DateTime?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName,StateName=this.InvocationInformation.BoundParameters.ContainsKey("StateName") ? StateName : null,Status=this.InvocationInformation.BoundParameters.ContainsKey("Status") ? Status : null,From=this.InvocationInformation.BoundParameters.ContainsKey("From") ? From : default(global::System.DateTime?),To=this.InvocationInformation.BoundParameters.ContainsKey("To") ? To : default(global::System.DateTime?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceListResult + /// 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.VMware.Models.IMaintenanceListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareOperation_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareOperation_List.cs index da7e7c9ab74e..6274f6d1209d 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareOperation_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareOperation_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List the operations for the provider")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/providers/Microsoft.AVS/operations", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/providers/Microsoft.AVS/operations", ApiVersion = "2025-09-01")] public partial class GetAzVMwareOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_Get.cs index 33e67cf8416a..bd621c7fd98e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePlacementPolicy_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentity.cs index 535fb6cfb335..a43e54a279e5 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePlacementPolicy_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityCluster.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityCluster.cs index d29ea2f84bd0..0a4e3e8b90d1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityCluster.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePlacementPolicy_GetViaIdentityCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityPrivateCloud.cs index 9de4dbe4c2ad..3c749e1e4186 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePlacementPolicy_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_List.cs index 8cb5f3c73dac..77ca2debc605 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePlacementPolicy_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List PlacementPolicy resources by Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePlacementPolicy_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudAdminCredential_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudAdminCredential_List.cs index 3be0d9b1c7bb..fafa34d11c91 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudAdminCredential_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudAdminCredential_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAdminCredentials))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List the admin credentials for the private cloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePrivateCloudAdminCredential_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_Get.cs new file mode 100644 index 000000000000..cf6be3083c0c --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_Get.cs @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Get the license for the private cloud + /// + /// [OpenAPI] GetVcfLicense=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwarePrivateCloudVcfLicense_Get", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get the license for the private cloud")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense", ApiVersion = "2025-09-01")] + public partial class GetAzVMwarePrivateCloudVcfLicense_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwarePrivateCloudVcfLicense_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateCloudsGetVcfLicense' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.PrivateCloudsGetVcfLicense(SubscriptionId, ResourceGroupName, PrivateCloudName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense + /// 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.VMware.Models.IVcfLicense + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_GetViaIdentity.cs new file mode 100644 index 000000000000..4a233945442d --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloudVcfLicense_GetViaIdentity.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Get the license for the private cloud + /// + /// [OpenAPI] GetVcfLicense=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzVMwarePrivateCloudVcfLicense_GetViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get the license for the private cloud")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/getVcfLicense", ApiVersion = "2025-09-01")] + public partial class GetAzVMwarePrivateCloudVcfLicense_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzVMwarePrivateCloudVcfLicense_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateCloudsGetVcfLicense' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.PrivateCloudsGetVcfLicenseViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.PrivateCloudsGetVcfLicense(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense + /// 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.VMware.Models.IVcfLicense + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_Get.cs index e401b95162e4..2b5ef748fa8f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePrivateCloud_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_GetViaIdentity.cs index 5eef135e4c35..099ccb0c0089 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePrivateCloud_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List.cs index 76a443f97dcb..6be1f117cb79 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List PrivateCloud resources by subscription ID")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePrivateCloud_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List1.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List1.cs index 1806a4fa4151..225e0415ca0f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List1.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePrivateCloud_List1.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List PrivateCloud resources by resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePrivateCloud_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_Get.cs index fc372dc856bd..478845c99133 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ProvisionedNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks/{provisionedNetworkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks/{provisionedNetworkName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareProvisionedNetwork_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentity.cs index fa3da49ad7a9..f097386c1d9b 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ProvisionedNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks/{provisionedNetworkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks/{provisionedNetworkName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareProvisionedNetwork_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentityPrivateCloud.cs index 0a739acab155..6094ed8d1619 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ProvisionedNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks/{provisionedNetworkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks/{provisionedNetworkName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareProvisionedNetwork_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_List.cs index f3a554e3ecd5..1d0acae004ac 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareProvisionedNetwork_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IProvisionedNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List ProvisionedNetwork resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks", ApiVersion = "2025-09-01")] public partial class GetAzVMwareProvisionedNetwork_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_Get.cs index 0204932d752f..38a7104b060b 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePureStoragePolicy_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentity.cs index 9acbc589dece..1847548704c9 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePureStoragePolicy_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentityPrivateCloud.cs index 5cc3ba1ca5e9..21de2ac02db6 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePureStoragePolicy_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_List.cs index 3a4ed1a8d33b..ea2d7e425fc4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwarePureStoragePolicy_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List PureStoragePolicy resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies", ApiVersion = "2025-09-01")] public partial class GetAzVMwarePureStoragePolicy_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_Get.cs index f225005d5971..8d6022140cc2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptCmdlet))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptCmdlet")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptCmdlet_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentity.cs index 89fcdf49cd7c..a428eb2c1783 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptCmdlet))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptCmdlet")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptCmdlet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityPrivateCloud.cs index 5511d0eccef1..c2fa0c65833d 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptCmdlet))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptCmdlet")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptCmdlet_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityScriptPackage.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityScriptPackage.cs index 16e698e1c0d3..8737a6bb2257 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityScriptPackage.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_GetViaIdentityScriptPackage.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptCmdlet))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptCmdlet")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptCmdlet_GetViaIdentityScriptPackage : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_List.cs index 309c1dea1cc5..02fb9be6fa42 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptCmdlet_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptCmdlet))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List ScriptCmdlet resources by ScriptPackage")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptCmdlet_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_Get.cs index 559c5f6713cf..6ccf82432f2d 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return the logs for a script execution resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptExecutionLog_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentity.cs index cd16ae9bb013..a5e6b2a13161 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return the logs for a script execution resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptExecutionLog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentityPrivateCloud.cs index 75be98999fad..f027ef2dc26e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecutionLog_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return the logs for a script execution resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptExecutionLog_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_Get.cs index 3af8172d2eef..e59b9438585e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptExecution_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentity.cs index 5a1540a32473..5f4fccd084d1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptExecution_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentityPrivateCloud.cs index b7c1c85ecd32..4c14b79d7022 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptExecution_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_List.cs index c10177113fd1..becefbbb02df 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptExecution_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List ScriptExecution resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptExecution_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_Get.cs index 7b50177114bb..1dd3a662f535 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptPackage))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptPackage")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptPackage_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentity.cs index 55ce1d99ba3e..c50cba0dae15 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptPackage))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptPackage")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptPackage_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentityPrivateCloud.cs index 9dcb0d0286da..558f9f1dfa57 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptPackage))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a ScriptPackage")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptPackage_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_List.cs index 71fc5671460e..a30c6d3a80cb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareScriptPackage_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptPackage))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List ScriptPackage resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages", ApiVersion = "2025-09-01")] public partial class GetAzVMwareScriptPackage_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareSku_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareSku_List.cs index 4165fec2c418..77aab8fafc15 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareSku_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareSku_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IResourceSku))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"A list of SKUs.")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/skus", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/skus", ApiVersion = "2025-09-01")] public partial class GetAzVMwareSku_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_Get.cs index a7eabceb1fbf..86ef4d096f08 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a VirtualMachine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareVirtualMachine_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentity.cs index 51b368344409..bee1b330a28c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a VirtualMachine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareVirtualMachine_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityCluster.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityCluster.cs index 94ce770fe661..ed984fe15870 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityCluster.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a VirtualMachine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareVirtualMachine_GetViaIdentityCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityPrivateCloud.cs index 5c2cf3ee1b10..7b9247b90416 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_GetViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a VirtualMachine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareVirtualMachine_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_List.cs index 1937d6ee8afe..c8c8c4b21152 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareVirtualMachine_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List VirtualMachine resources by Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines", ApiVersion = "2025-09-01")] public partial class GetAzVMwareVirtualMachine_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_Get.cs index 507d91978b5b..bff21a708a02 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDhcp_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentity.cs index 75cb2cc617be..2e8246268896 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDhcp_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentityDhcpConfiguration.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentityDhcpConfiguration.cs index 7402207045a8..47181df5bc6c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentityDhcpConfiguration.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_GetViaIdentityDhcpConfiguration.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDhcp_GetViaIdentityDhcpConfiguration : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_List.cs index a7fadc143597..4cc74511c283 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDhcp_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkDhcp resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDhcp_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_Get.cs index 3dcb3db57bad..3c084d71fce7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsService_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentity.cs index 792e698c162e..612cb518f3e0 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsService_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentityPrivateCloud.cs index 733e0e16d58c..06e9fca8f0f1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsService_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_List.cs index 42f218398a57..2a34d6c80fb6 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsService_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkDnsService resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsService_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_Get.cs index 263e3bef538b..c47e42fc98fe 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsZone_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentity.cs index a41212aacf1a..b4bfbc29aed0 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentityPrivateCloud.cs index 00ea20294542..1f94ad805ab4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsZone_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_List.cs index 6e426e7e3201..c813f5dcc832 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkDnsZone_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkDnsZone resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkDnsZone_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_Get.cs index c40b4e496ac9..d733e2111080 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkGateway_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentity.cs index 274181054156..7aa50f22950f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkGateway_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentityPrivateCloud.cs index df663887b9c0..5bc5567e8bb6 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkGateway")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkGateway_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_List.cs index 91cf8b41c12b..7576495d02cd 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkGateway_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkGateway))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkGateway resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkGateway_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_Get.cs index c1a318c432b3..e21acb19c6ca 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPortMirroring_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentity.cs index e233b51f9d50..fa3dbee5de8f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentityPrivateCloud.cs index e527d5378bd6..a3a14dbb01a9 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPortMirroring_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_List.cs index 0cc0a06a96db..cf4c6507b258 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPortMirroring_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkPortMirroring resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPortMirroring_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_Get.cs index cd14ae0c71f4..5e9834a7fde4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPublicIP_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentity.cs index b12f9a366aaa..f64e712241e4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentityPrivateCloud.cs index e949e40fa3b4..916386f5005e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPublicIP_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_List.cs index 8683b7edfa1c..3a84647cd6df 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkPublicIP_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkPublicIP resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkPublicIP_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_Get.cs index 3ed3d1791f87..bfd1ca32773e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkSegment_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentity.cs index 64a19539e6e9..4ce8b7ac5809 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkSegment_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentityPrivateCloud.cs index c570f56bde88..bb77af88e91d 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkSegment_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_List.cs index 3017fba4b568..4a2c3a288654 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkSegment_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkSegment resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkSegment_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_Get.cs index 08b5de7ca288..97462f9bf196 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVMGroup_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentity.cs index 7789b33bb9cc..956fd8fedd51 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentityPrivateCloud.cs index ab8c1ba6c9db..709051b4f5b6 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVMGroup_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_List.cs index 7e2a7e11eca6..12058315c588 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVMGroup_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkVMGroup resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVMGroup_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_Get.cs index 3216bccb84d9..47c57bfd5a07 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkVirtualMachine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVM_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentity.cs index d5f85793fd25..10c7a14a1449 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkVirtualMachine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVM_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentityPrivateCloud.cs index d1033c9fef63..1790de211a79 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_GetViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetworkVirtualMachine")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVM_GetViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_List.cs index 188b0dd519c9..ba9eb68f7a6f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetworkVM_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVirtualMachine))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetworkVirtualMachine resources by WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetworkVM_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_Get.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_Get.cs index 651921a2e29a..642026a6bc5f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_Get.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetwork_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_GetViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_GetViaIdentity.cs index dd82d02ca919..4d15d3bad5d1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_GetViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Get a WorkloadNetwork")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetwork_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_List.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_List.cs index 6ae20b970bfd..db07a7464fb8 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_List.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/GetAzVMwareWorkloadNetwork_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"List WorkloadNetwork resources by PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks", ApiVersion = "2025-09-01")] public partial class GetAzVMwareWorkloadNetwork_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_Initiate.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_Initiate.cs new file mode 100644 index 000000000000..d2034abc04aa --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_Initiate.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Initiate maintenance readiness checks + /// + /// [OpenAPI] InitiateChecks=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareInitiateMaintenanceCheck_Initiate", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Initiate maintenance readiness checks")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareInitiateMaintenanceCheck_Initiate : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareInitiateMaintenanceCheck_Initiate() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesInitiateChecks' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesInitiateChecks(SubscriptionId, ResourceGroupName, PrivateCloudName, MaintenanceName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName,MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentity.cs new file mode 100644 index 000000000000..990e02226593 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentity.cs @@ -0,0 +1,492 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Initiate maintenance readiness checks + /// + /// [OpenAPI] InitiateChecks=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareInitiateMaintenanceCheck_InitiateViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Initiate maintenance readiness checks")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentity() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesInitiateChecks' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.MaintenancesInitiateChecksViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.MaintenanceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MaintenanceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenancesInitiateChecks(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, InputObject.MaintenanceName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud.cs new file mode 100644 index 000000000000..ec164802006c --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud.cs @@ -0,0 +1,504 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Initiate maintenance readiness checks + /// + /// [OpenAPI] InitiateChecks=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Initiate maintenance readiness checks")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/initiateChecks", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _privateCloudInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity PrivateCloudInputObject { get => this._privateCloudInputObject; set => this._privateCloudInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public InvokeAzVMwareInitiateMaintenanceCheck_InitiateViaIdentityPrivateCloud() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesInitiateChecks' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PrivateCloudInputObject?.Id != null) + { + this.PrivateCloudInputObject.Id += $"/maintenances/{(global::System.Uri.EscapeDataString(this.MaintenanceName.ToString()))}"; + await this.Client.MaintenancesInitiateChecksViaIdentity(PrivateCloudInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PrivateCloudInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + await this.Client.MaintenancesInitiateChecks(PrivateCloudInputObject.SubscriptionId ?? null, PrivateCloudInputObject.ResourceGroupName ?? null, PrivateCloudInputObject.PrivateCloudName ?? null, MaintenanceName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_Reschedule.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_Reschedule.cs new file mode 100644 index 000000000000..1ffbd1a45c90 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_Reschedule.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Reschedule a maintenance + /// + /// [OpenAPI] Reschedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareRescheduleMaintenance_Reschedule", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Reschedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareRescheduleMaintenance_Reschedule : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule _body; + + /// reschedule a maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "reschedule a maintenance", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"reschedule a maintenance", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule Body { get => this._body; set => this._body = 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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareRescheduleMaintenance_Reschedule() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesReschedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesReschedule(SubscriptionId, ResourceGroupName, PrivateCloudName, MaintenanceName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName,MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleExpanded.cs new file mode 100644 index 000000000000..7df2f87036fc --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleExpanded.cs @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Reschedule a maintenance + /// + /// [OpenAPI] Reschedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareRescheduleMaintenance_RescheduleExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Reschedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareRescheduleMaintenance_RescheduleExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// reschedule a maintenance + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule _body = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReschedule(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// rescheduling reason + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "rescheduling reason")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rescheduling reason", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + public string Message { get => _body.Message ?? null; set => _body.Message = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// reschedule time + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "reschedule time")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"reschedule time", + SerializedName = @"rescheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime RescheduleTime { get => _body.RescheduleTime ?? default(global::System.DateTime); set => _body.RescheduleTime = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareRescheduleMaintenance_RescheduleExpanded() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesReschedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesReschedule(SubscriptionId, ResourceGroupName, PrivateCloudName, MaintenanceName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName,MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentity.cs new file mode 100644 index 000000000000..c0267ea7cc55 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentity.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Reschedule a maintenance + /// + /// [OpenAPI] Reschedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareRescheduleMaintenance_RescheduleViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Reschedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule _body; + + /// reschedule a maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "reschedule a maintenance", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"reschedule a maintenance", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule Body { get => this._body; set => this._body = 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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentity() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesReschedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.MaintenancesRescheduleViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.MaintenanceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MaintenanceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenancesReschedule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, InputObject.MaintenanceName ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded.cs new file mode 100644 index 000000000000..551f8e640378 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Reschedule a maintenance + /// + /// [OpenAPI] Reschedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Reschedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// reschedule a maintenance + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule _body = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReschedule(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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; } } + + /// rescheduling reason + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "rescheduling reason")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rescheduling reason", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + public string Message { get => _body.Message ?? null; set => _body.Message = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// reschedule time + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "reschedule time")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"reschedule time", + SerializedName = @"rescheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime RescheduleTime { get => _body.RescheduleTime ?? default(global::System.DateTime); set => _body.RescheduleTime = 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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityExpanded() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesReschedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.MaintenancesRescheduleViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.MaintenanceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MaintenanceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenancesReschedule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, InputObject.MaintenanceName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud.cs new file mode 100644 index 000000000000..baf3ff90595f --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Reschedule a maintenance + /// + /// [OpenAPI] Reschedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Reschedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule _body; + + /// reschedule a maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "reschedule a maintenance", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"reschedule a maintenance", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule Body { get => this._body; set => this._body = 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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _privateCloudInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity PrivateCloudInputObject { get => this._privateCloudInputObject; set => this._privateCloudInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloud() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesReschedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PrivateCloudInputObject?.Id != null) + { + this.PrivateCloudInputObject.Id += $"/maintenances/{(global::System.Uri.EscapeDataString(this.MaintenanceName.ToString()))}"; + await this.Client.MaintenancesRescheduleViaIdentity(PrivateCloudInputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PrivateCloudInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + await this.Client.MaintenancesReschedule(PrivateCloudInputObject.SubscriptionId ?? null, PrivateCloudInputObject.ResourceGroupName ?? null, PrivateCloudInputObject.PrivateCloudName ?? null, MaintenanceName, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded.cs new file mode 100644 index 000000000000..32b8ea5a9477 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Reschedule a maintenance + /// + /// [OpenAPI] Reschedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Reschedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/reschedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// reschedule a maintenance + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceReschedule _body = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceReschedule(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// rescheduling reason + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "rescheduling reason")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rescheduling reason", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + public string Message { get => _body.Message ?? null; set => _body.Message = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _privateCloudInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity PrivateCloudInputObject { get => this._privateCloudInputObject; set => this._privateCloudInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// reschedule time + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "reschedule time")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"reschedule time", + SerializedName = @"rescheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime RescheduleTime { get => _body.RescheduleTime ?? default(global::System.DateTime); set => _body.RescheduleTime = 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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareRescheduleMaintenance_RescheduleViaIdentityPrivateCloudExpanded() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesReschedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PrivateCloudInputObject?.Id != null) + { + this.PrivateCloudInputObject.Id += $"/maintenances/{(global::System.Uri.EscapeDataString(this.MaintenanceName.ToString()))}"; + await this.Client.MaintenancesRescheduleViaIdentity(PrivateCloudInputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PrivateCloudInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + await this.Client.MaintenancesReschedule(PrivateCloudInputObject.SubscriptionId ?? null, PrivateCloudInputObject.ResourceGroupName ?? null, PrivateCloudInputObject.PrivateCloudName ?? null, MaintenanceName, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_Schedule.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_Schedule.cs new file mode 100644 index 000000000000..dd000ca1d262 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_Schedule.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Schedule a maintenance + /// + /// [OpenAPI] Schedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareScheduleMaintenance_Schedule", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Schedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareScheduleMaintenance_Schedule : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule _body; + + /// schedule a maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "schedule a maintenance", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"schedule a maintenance", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule Body { get => this._body; set => this._body = 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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareScheduleMaintenance_Schedule() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesSchedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesSchedule(SubscriptionId, ResourceGroupName, PrivateCloudName, MaintenanceName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName,MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleExpanded.cs new file mode 100644 index 000000000000..7c25e38d0f91 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleExpanded.cs @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Schedule a maintenance + /// + /// [OpenAPI] Schedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareScheduleMaintenance_ScheduleExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Schedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareScheduleMaintenance_ScheduleExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// schedule a maintenance + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule _body = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceSchedule(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// scheduling message + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "scheduling message")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"scheduling message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + public string Message { get => _body.Message ?? null; set => _body.Message = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// schedule time + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "schedule time")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"schedule time", + SerializedName = @"scheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime ScheduleTime { get => _body.ScheduleTime ?? default(global::System.DateTime); set => _body.ScheduleTime = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareScheduleMaintenance_ScheduleExpanded() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesSchedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MaintenancesSchedule(SubscriptionId, ResourceGroupName, PrivateCloudName, MaintenanceName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName,MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentity.cs new file mode 100644 index 000000000000..b767536c0657 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentity.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Schedule a maintenance + /// + /// [OpenAPI] Schedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareScheduleMaintenance_ScheduleViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Schedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule _body; + + /// schedule a maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "schedule a maintenance", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"schedule a maintenance", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule Body { get => this._body; set => this._body = 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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentity() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesSchedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.MaintenancesScheduleViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.MaintenanceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MaintenanceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenancesSchedule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, InputObject.MaintenanceName ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded.cs new file mode 100644 index 000000000000..2831b35dd9c9 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Schedule a maintenance + /// + /// [OpenAPI] Schedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Schedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// schedule a maintenance + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule _body = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceSchedule(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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; } } + + /// scheduling message + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "scheduling message")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"scheduling message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + public string Message { get => _body.Message ?? null; set => _body.Message = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// schedule time + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "schedule time")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"schedule time", + SerializedName = @"scheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime ScheduleTime { get => _body.ScheduleTime ?? default(global::System.DateTime); set => _body.ScheduleTime = 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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityExpanded() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesSchedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.MaintenancesScheduleViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.MaintenanceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MaintenanceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenancesSchedule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, InputObject.MaintenanceName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud.cs new file mode 100644 index 000000000000..affda3cc8f0b --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Schedule a maintenance + /// + /// [OpenAPI] Schedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Schedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule _body; + + /// schedule a maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "schedule a maintenance", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"schedule a maintenance", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule Body { get => this._body; set => this._body = 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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _privateCloudInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity PrivateCloudInputObject { get => this._privateCloudInputObject; set => this._privateCloudInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloud() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesSchedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PrivateCloudInputObject?.Id != null) + { + this.PrivateCloudInputObject.Id += $"/maintenances/{(global::System.Uri.EscapeDataString(this.MaintenanceName.ToString()))}"; + await this.Client.MaintenancesScheduleViaIdentity(PrivateCloudInputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PrivateCloudInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + await this.Client.MaintenancesSchedule(PrivateCloudInputObject.SubscriptionId ?? null, PrivateCloudInputObject.ResourceGroupName ?? null, PrivateCloudInputObject.PrivateCloudName ?? null, MaintenanceName, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded.cs new file mode 100644 index 000000000000..ae1d298caf32 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Schedule a maintenance + /// + /// [OpenAPI] Schedule=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Schedule a maintenance")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/maintenances/{maintenanceName}/schedule", ApiVersion = "2025-09-01")] + public partial class InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// schedule a maintenance + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenanceSchedule _body = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.MaintenanceSchedule(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 _maintenanceName; + + /// Name of the maintenance + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the maintenance")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the maintenance", + SerializedName = @"maintenanceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string MaintenanceName { get => this._maintenanceName; set => this._maintenanceName = value; } + + /// scheduling message + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "scheduling message")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"scheduling message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + public string Message { get => _body.Message ?? null; set => _body.Message = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _privateCloudInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity PrivateCloudInputObject { get => this._privateCloudInputObject; set => this._privateCloudInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// schedule time + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "schedule time")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"schedule time", + SerializedName = @"scheduleTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime ScheduleTime { get => _body.ScheduleTime ?? default(global::System.DateTime); set => _body.ScheduleTime = 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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzVMwareScheduleMaintenance_ScheduleViaIdentityPrivateCloudExpanded() + { + + } + + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MaintenancesSchedule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PrivateCloudInputObject?.Id != null) + { + this.PrivateCloudInputObject.Id += $"/maintenances/{(global::System.Uri.EscapeDataString(this.MaintenanceName.ToString()))}"; + await this.Client.MaintenancesScheduleViaIdentity(PrivateCloudInputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PrivateCloudInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + if (null == PrivateCloudInputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PrivateCloudInputObject has null value for PrivateCloudInputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PrivateCloudInputObject) ); + } + await this.Client.MaintenancesSchedule(PrivateCloudInputObject.SubscriptionId ?? null, PrivateCloudInputObject.ResourceGroupName ?? null, PrivateCloudInputObject.PrivateCloudName ?? null, MaintenanceName, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { MaintenanceName=MaintenanceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IMaintenance + /// 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.VMware.Models.IMaintenance + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictExpanded.cs index 3dc329db6315..d5964bd0a559 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Enable or disable DRS-driven VM movement restriction")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2025-09-01")] public partial class LockAzVMwareVirtualMachineMovement_RestrictExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class LockAzVMwareVirtualMachineMovement_RestrictExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Set VM DRS-driven movement to restricted (enabled) or not (disabled) private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachineRestrictMovement _restrictMovementBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VirtualMachineRestrictMovement(); @@ -297,11 +288,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.LockAzVMwareVirtualMach /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,7 +599,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityClusterExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityClusterExpanded.cs index 45dbef945cb7..f47c0ac63109 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityClusterExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityClusterExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Enable or disable DRS-driven VM movement restriction")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2025-09-01")] public partial class LockAzVMwareVirtualMachineMovement_RestrictViaIdentityClusterExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class LockAzVMwareVirtualMachineMovement_RestrictViaIdentityClust /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Set VM DRS-driven movement to restricted (enabled) or not (disabled) private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachineRestrictMovement _restrictMovementBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VirtualMachineRestrictMovement(); @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.LockAzVMwareVirtualMach /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,7 +570,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityExpanded.cs index b0377ac45249..f9eda4e3e06f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Enable or disable DRS-driven VM movement restriction")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2025-09-01")] public partial class LockAzVMwareVirtualMachineMovement_RestrictViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class LockAzVMwareVirtualMachineMovement_RestrictViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Set VM DRS-driven movement to restricted (enabled) or not (disabled) private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachineRestrictMovement _restrictMovementBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VirtualMachineRestrictMovement(); @@ -227,11 +218,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.LockAzVMwareVirtualMach /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -572,7 +558,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityPrivateCloudExpanded.cs index 437c8b1cb54b..0ab887dc1a03 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/LockAzVMwareVirtualMachineMovement_RestrictViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Enable or disable DRS-driven VM movement restriction")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", ApiVersion = "2025-09-01")] public partial class LockAzVMwareVirtualMachineMovement_RestrictViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class LockAzVMwareVirtualMachineMovement_RestrictViaIdentityPriva /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Set VM DRS-driven movement to restricted (enabled) or not (disabled) private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVirtualMachineRestrictMovement _restrictMovementBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.VirtualMachineRestrictMovement(); @@ -257,11 +248,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.LockAzVMwareVirtualMach /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,7 +581,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateExpanded.cs index 2ef8fca7e6c6..852e919f5a05 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareAddon_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -44,15 +44,6 @@ public partial class NewAzVMwareAddon_CreateExpanded : global::System.Management /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareAddon_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityExpanded.cs index ea6594a8865a..9547cf6c5d28 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareAddon_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -44,15 +44,6 @@ public partial class NewAzVMwareAddon_CreateViaIdentityExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareAddon_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityPrivateCloudExpanded.cs index 6112c1ca43e0..cf6c7c49c539 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAddon_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareAddon_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -44,15 +44,6 @@ public partial class NewAzVMwareAddon_CreateViaIdentityPrivateCloudExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareAddon_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -576,24 +562,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IAddon var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateExpanded.cs index 202378a20753..cc2e13f29982 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareAuthorization_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareAuthorization_CreateExpanded : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareAuthorizatio /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityExpanded.cs index dc443112f69a..a7dc699606a3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareAuthorization_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareAuthorization_CreateViaIdentityExpanded : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareAuthorizatio /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityPrivateCloudExpanded.cs index 929184cc435e..2797b9b34011 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareAuthorization_CreateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareAuthorization_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareAuthorization_CreateViaIdentityPrivateCloudExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareAuthorizatio /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateExpanded.cs index 61d7abe4f40f..501f7a828bfc 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareCloudLink_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareCloudLink_CreateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareCloudLink_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityExpanded.cs index 117dbc297f65..57ed3dfe9381 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareCloudLink_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareCloudLink_CreateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareCloudLink_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityPrivateCloudExpanded.cs index a0a3fac8a807..7b7ea877486c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCloudLink_CreateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareCloudLink_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareCloudLink_CreateViaIdentityPrivateCloudExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareCloudLink_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateExpanded.cs index a837a63998c5..355784ed2c0b 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareCluster_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareCluster_CreateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -365,11 +356,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareCluster_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -685,24 +671,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityExpanded.cs index e66eeb9e8a3f..ba129a7065eb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareCluster_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareCluster_CreateViaIdentityExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -307,11 +298,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareCluster_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -651,24 +637,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityPrivateCloudExpanded.cs index 069104c0aa5f..879c6216856e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareCluster_CreateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareCluster_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareCluster_CreateViaIdentityPrivateCloudExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -325,11 +316,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareCluster_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -666,24 +652,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateExpanded.cs index cff049a371ec..ae92d2f67267 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareDatastore_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareDatastore_CreateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -360,11 +351,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareDatastore_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -680,24 +666,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityClusterExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityClusterExpanded.cs index 9f3cf177d91c..a8b39bffa927 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityClusterExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityClusterExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareDatastore_CreateViaIdentityClusterExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareDatastore_CreateViaIdentityClusterExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -303,11 +294,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareDatastore_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -648,24 +634,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityExpanded.cs index c92b2ef89003..5d40c29e48e3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareDatastore_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareDatastore_CreateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -287,11 +278,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareDatastore_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -635,24 +621,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityPrivateCloudExpanded.cs index b4a8565ac8f6..8357172f9773 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareDatastore_CreateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareDatastore_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class NewAzVMwareDatastore_CreateViaIdentityPrivateCloudExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -320,11 +311,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareDatastore_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -661,24 +647,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateExpanded.cs index 2346dfac0519..4512779a99ff 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareGlobalReachConnection_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwareGlobalReachConnection_CreateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A global reach connection resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection _globalReachConnectionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.GlobalReachConnection(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -304,11 +295,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareGlobalReachC /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -624,24 +610,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityExpanded.cs index 590db4fee997..a0a3c4310499 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareGlobalReachConnection_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwareGlobalReachConnection_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A global reach connection resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection _globalReachConnectionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.GlobalReachConnection(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -248,11 +239,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareGlobalReachC /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityPrivateCloudExpanded.cs index 357a4e54e54e..196f2620c2de 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareGlobalReachConnection_CreateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareGlobalReachConnection_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwareGlobalReachConnection_CreateViaIdentityPrivateCl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A global reach connection resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection _globalReachConnectionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.GlobalReachConnection(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareGlobalReachC /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -606,24 +592,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateExpanded.cs index 0647e945cf6c..2bffdc1e98a5 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a IscsiPath")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2025-09-01")] public partial class NewAzVMwareIscsiPath_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwareIscsiPath_CreateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An iSCSI path resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IscsiPath(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareIscsiPath_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateViaIdentityExpanded.cs index 2bac21be2367..4b32d7e4df68 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareIscsiPath_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a IscsiPath")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2025-09-01")] public partial class NewAzVMwareIscsiPath_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwareIscsiPath_CreateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An iSCSI path resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IscsiPath(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareIscsiPath_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -558,24 +544,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateExpanded.cs new file mode 100644 index 000000000000..38a76ff6207b --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateExpanded.cs @@ -0,0 +1,562 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// create a License + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzVMwareLicense_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}", ApiVersion = "2025-09-01")] + public partial class NewAzVMwareLicense_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A license resource + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzVMwareLicense_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareLicense_CreateExpanded Clone() + { + var clone = new NewAzVMwareLicense_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PrivateCloudName = this.PrivateCloudName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzVMwareLicense_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LicensesCreateOrUpdate(SubscriptionId, ResourceGroupName, PrivateCloudName, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Models.ILicense + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateViaIdentityExpanded.cs new file mode 100644 index 000000000000..9800781d1771 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareLicense_CreateViaIdentityExpanded.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// create a License + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzVMwareLicense_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}", ApiVersion = "2025-09-01")] + public partial class NewAzVMwareLicense_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A license resource + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzVMwareLicense_CreateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareLicense_CreateViaIdentityExpanded Clone() + { + var clone = new NewAzVMwareLicense_CreateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzVMwareLicense_CreateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LicensesCreateOrUpdateViaIdentity(InputObject.Id, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LicensesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Models.ILicense + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateExpanded.cs index 38d9bf341974..b9539cb25501 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePlacementPolicy_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwarePlacementPolicy_CreateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A vSphere Distributed Resource Scheduler (DRS) placement policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy _placementPolicyBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -291,11 +282,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePlacementPol /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -611,24 +597,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityClusterExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityClusterExpanded.cs index 236e2864167c..129ab08980b2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityClusterExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityClusterExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePlacementPolicy_CreateViaIdentityClusterExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwarePlacementPolicy_CreateViaIdentityClusterExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A vSphere Distributed Resource Scheduler (DRS) placement policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy _placementPolicyBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePlacementPol /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityExpanded.cs index 4d48aed343dd..34d3768448c4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePlacementPolicy_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwarePlacementPolicy_CreateViaIdentityExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A vSphere Distributed Resource Scheduler (DRS) placement policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy _placementPolicyBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePlacementPol /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -566,24 +552,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityPrivateCloudExpanded.cs index 8d6fb2a08f63..96f40617b59f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePlacementPolicy_CreateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePlacementPolicy_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwarePlacementPolicy_CreateViaIdentityPrivateCloudExp /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A vSphere Distributed Resource Scheduler (DRS) placement policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy _placementPolicyBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -251,11 +242,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePlacementPol /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -593,24 +579,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_Rotate.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_Rotate.cs index 23950722f3be..deef326ec021 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_Rotate.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_Rotate.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Rotate the NSX-T Manager password")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePrivateCloudNsxtPassword_Rotate : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class NewAzVMwarePrivateCloudNsxtPassword_Rotate : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePrivateCloud /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -576,7 +562,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -600,7 +586,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_RotateViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_RotateViaIdentity.cs index 3b0df4518cc5..4381bc3a3701 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_RotateViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudNsxtPassword_RotateViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Rotate the NSX-T Manager password")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePrivateCloudNsxtPassword_RotateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class NewAzVMwarePrivateCloudNsxtPassword_RotateViaIdentity : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePrivateCloud /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -554,7 +540,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -578,7 +564,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_Rotate.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_Rotate.cs index 325c3abc18b7..e3069ac2d3f9 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_Rotate.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_Rotate.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Rotate the vCenter password")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePrivateCloudVcenterPassword_Rotate : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class NewAzVMwarePrivateCloudVcenterPassword_Rotate : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePrivateCloud /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -576,7 +562,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -600,7 +586,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_RotateViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_RotateViaIdentity.cs index bd122957f162..db11c3f66435 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_RotateViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloudVcenterPassword_RotateViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Rotate the vCenter password")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePrivateCloudVcenterPassword_RotateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class NewAzVMwarePrivateCloudVcenterPassword_RotateViaIdentity : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePrivateCloud /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -556,7 +542,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -580,7 +566,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloud_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloud_CreateExpanded.cs index d69d0a436c72..213f04dd1054 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloud_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePrivateCloud_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePrivateCloud_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,18 +41,9 @@ public partial class NewAzVMwarePrivateCloud_CreateExpanded : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A private cloud resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud _privateCloudBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PrivateCloud(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -567,11 +558,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePrivateCloud /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -887,24 +873,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateExpanded.cs index c29126088ae0..e52586714ac4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePureStoragePolicy_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwarePureStoragePolicy_CreateExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An instance describing a Pure Storage Policy Based Management policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PureStoragePolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -286,11 +277,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePureStorageP /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -606,24 +592,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityExpanded.cs index 8c791fef94b1..61a6bebd4de9 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePureStoragePolicy_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwarePureStoragePolicy_CreateViaIdentityExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An instance describing a Pure Storage Policy Based Management policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PureStoragePolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -229,11 +220,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePureStorageP /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -573,24 +559,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityPrivateCloudExpanded.cs index f2b0d2cd0717..3ae823304dd8 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwarePureStoragePolicy_CreateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwarePureStoragePolicy_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class NewAzVMwarePureStoragePolicy_CreateViaIdentityPrivateCloudE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An instance describing a Pure Storage Policy Based Management policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PureStoragePolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -246,11 +237,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwarePureStorageP /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -588,24 +574,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateExpanded.cs index 353a78fd04d5..87f0f02144af 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareScriptExecution_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareScriptExecution_CreateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// An instance of a script executed by a user - custom or AVS private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution _scriptExecutionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptExecution(); @@ -362,11 +353,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareScriptExecut /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -682,24 +668,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityExpanded.cs index 94de22f10edf..79a7d294e707 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareScriptExecution_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareScriptExecution_CreateViaIdentityExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// An instance of a script executed by a user - custom or AVS private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution _scriptExecutionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptExecution(); @@ -304,11 +295,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareScriptExecut /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -648,24 +634,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityPrivateCloudExpanded.cs index fbe3149a476a..7e3c90097aba 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareScriptExecution_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareScriptExecution_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareScriptExecution_CreateViaIdentityPrivateCloudExp /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// An instance of a script executed by a user - custom or AVS private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution _scriptExecutionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ScriptExecution(); @@ -322,11 +313,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareScriptExecut /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -664,24 +650,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IScriptExecution var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateExpanded.cs index bff9479241a6..b3b359911334 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDhcp_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDhcp_CreateExpanded : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DHCP private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp _workloadNetworkDhcpBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDhcp(); @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -619,24 +605,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityExpanded.cs index 35ea9d765475..4bed02218944 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DHCP private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp _workloadNetworkDhcpBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDhcp(); @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -588,24 +574,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityPrivateCloudExpanded.cs index dde1e2251aef..a876b2e9fa83 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDhcp_CreateViaIdentityPrivateClou /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DHCP private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp _workloadNetworkDhcpBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDhcp(); @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateExpanded.cs index 2e1b59a17d91..d2de796d62b1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDnsService_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDnsService_CreateExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Service private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService _workloadNetworkDnsServiceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsService(); @@ -333,11 +324,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -653,24 +639,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityExpanded.cs index d604bf45071d..19c025b289c7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Service private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService _workloadNetworkDnsServiceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsService(); @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityPrivateCloudExpanded.cs index a973d0cbff28..cbdcead55192 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDnsService_CreateViaIdentityPriva /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Service private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService _workloadNetworkDnsServiceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsService(); @@ -293,11 +284,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -635,24 +621,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateExpanded.cs index d8ada83c1ca3..0014765879c9 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDnsZone_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDnsZone_CreateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Zone private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone _workloadNetworkDnsZoneBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsZone(); @@ -333,11 +324,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -653,24 +639,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityExpanded.cs index 8d30ac2c1026..14dd572dda47 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Zone private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone _workloadNetworkDnsZoneBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsZone(); @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -622,24 +608,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityPrivateCloudExpanded.cs index 77e093dd7eaf..da5f5d0e5076 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkDnsZone_CreateViaIdentityPrivateC /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Zone private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone _workloadNetworkDnsZoneBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsZone(); @@ -293,11 +284,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -635,24 +621,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateExpanded.cs index 6017d0c76c44..d15435a102b3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkPortMirroring_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkPortMirroring_CreateExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Port Mirroring private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring _workloadNetworkPortMirroringBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPortMirroring(); @@ -321,11 +312,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityExpanded.cs index 5ff36b02aa99..da1718c1fdb6 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Port Mirroring private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring _workloadNetworkPortMirroringBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPortMirroring(); @@ -266,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -611,24 +597,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityPrivateCloudExpanded.cs index 88fad664490a..04a4d6905213 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkPortMirroring_CreateViaIdentityPr /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Port Mirroring private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring _workloadNetworkPortMirroringBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPortMirroring(); @@ -281,11 +272,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateExpanded.cs index b0febaf2d3e0..f524dd5a537b 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkPublicIP_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkPublicIP_CreateExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Public IP Block private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP _workloadNetworkPublicIPBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPublicIP(); @@ -287,11 +278,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,24 +593,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityExpanded.cs index ec56a5461c1d..f7848fb43746 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Public IP Block private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP _workloadNetworkPublicIPBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPublicIP(); @@ -232,11 +223,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -576,24 +562,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityPrivateCloudExpanded.cs index ef4d920796a4..4dc1edfba9d1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkPublicIP_CreateViaIdentityPrivate /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Public IP Block private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP _workloadNetworkPublicIPBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPublicIP(); @@ -247,11 +238,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -589,24 +575,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPublicIP var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateExpanded.cs index 36ace85fe3ee..91eaca77ca51 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkSegment_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkSegment_CreateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Segment private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment _workloadNetworkSegmentBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkSegment(); @@ -321,11 +312,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityExpanded.cs index 738b6053c864..755982a6e59e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Segment private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment _workloadNetworkSegmentBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkSegment(); @@ -266,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -610,24 +596,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityPrivateCloudExpanded.cs index 98aae39505a7..bd8e66a319e7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkSegment_CreateViaIdentityPrivateC /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Segment private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment _workloadNetworkSegmentBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkSegment(); @@ -281,11 +272,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateExpanded.cs index 0117059640fb..7c40302d4d0f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkVMGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkVMGroup_CreateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX VM Group private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup _workloadNetworkVMGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkVMGroup(); @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -619,24 +605,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityExpanded.cs index 9c46650d7241..b5e9f8b19a8d 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX VM Group private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup _workloadNetworkVMGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkVMGroup(); @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -588,24 +574,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityPrivateCloudExpanded.cs index 24abdc1ee7eb..b2e1aa2ca17c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"create a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class NewAzVMwareWorkloadNetworkVMGroup_CreateViaIdentityPrivateC /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX VM Group private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup _workloadNetworkVMGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkVMGroup(); @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.NewAzVMwareWorkloadNetw /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_Delete.cs index fdbfdd5e9604..4986ae3eeb87 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareAddon_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareAddon_Delete : global::System.Management.Auto /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareAddon_Del /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -593,7 +579,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -617,7 +603,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentity.cs index 0504f4267a76..71cfa498361a 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareAddon_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareAddon_DeleteViaIdentity : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareAddon_Del /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -559,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -583,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentityPrivateCloud.cs index 74df9bc15ca1..46aa19b858bc 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAddon_DeleteViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Addon")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareAddon_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareAddon_DeleteViaIdentityPrivateCloud : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareAddon_Del /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -572,7 +558,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -596,7 +582,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_Delete.cs index 8b23cbab628d..b3f4ea11f179 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareAuthorization_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareAuthorization_Delete : global::System.Managem /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareAuthoriza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentity.cs index 503c9a4b5ddd..4afab17c10d9 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareAuthorization_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareAuthorization_DeleteViaIdentity : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareAuthoriza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -558,7 +544,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -582,7 +568,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentityPrivateCloud.cs index 515289566fae..ab1020ce69b5 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareAuthorization_DeleteViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a ExpressRouteAuthorization")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareAuthorization_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareAuthorization_DeleteViaIdentityPrivateCloud : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareAuthoriza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -573,7 +559,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -597,7 +583,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_Delete.cs index 71d5511c483e..8f8dd6b7fe18 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareCloudLink_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareCloudLink_Delete : global::System.Management. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareCloudLink /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentity.cs index 715599cec911..dff953a7d8e2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareCloudLink_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareCloudLink_DeleteViaIdentity : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareCloudLink /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -558,7 +544,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -582,7 +568,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentityPrivateCloud.cs index 90646a1a45ff..267e37249b70 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCloudLink_DeleteViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a CloudLink")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareCloudLink_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareCloudLink_DeleteViaIdentityPrivateCloud : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareCloudLink /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -571,7 +557,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -595,7 +581,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_Delete.cs index 6f036f19732b..1b19ae972101 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareCluster_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareCluster_Delete : global::System.Management.Au /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareCluster_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentity.cs index 49922d092af7..6d4f01ab5841 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareCluster_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareCluster_DeleteViaIdentity : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareCluster_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -558,7 +544,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -582,7 +568,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentityPrivateCloud.cs index 14007b284c9d..96d17daa5d7a 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareCluster_DeleteViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareCluster_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareCluster_DeleteViaIdentityPrivateCloud : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareCluster_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -571,7 +557,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -595,7 +581,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_Delete.cs index 631da3993b64..17bafd8f84d7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareDatastore_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareDatastore_Delete : global::System.Management. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -291,11 +282,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,7 +593,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -631,7 +617,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentity.cs index d624dcfdc965..fadf136d0cf4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareDatastore_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareDatastore_DeleteViaIdentity : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,7 +548,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -586,7 +572,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityCluster.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityCluster.cs index 9c88189b637e..e4202f12fa78 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityCluster.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareDatastore_DeleteViaIdentityCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareDatastore_DeleteViaIdentityCluster : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,7 +561,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -599,7 +585,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityPrivateCloud.cs index f7b4db543d73..b78c4b392e33 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareDatastore_DeleteViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a Datastore")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareDatastore_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareDatastore_DeleteViaIdentityPrivateCloud : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -249,11 +240,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,7 +572,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -610,7 +596,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_Delete.cs index b6285c95e400..2ca6d48add47 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareGlobalReachConnection_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareGlobalReachConnection_Delete : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareGlobalRea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentity.cs index 7e03bc3a8029..c433fc61cf45 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareGlobalReachConnection_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareGlobalReachConnection_DeleteViaIdentity : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareGlobalRea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -558,7 +544,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -582,7 +568,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud.cs index 36c60fee9c69..af0e9c6fe1de 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a GlobalReachConnection")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareGlobalReachConnection_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareGlobalReachConnection_DeleteViaIdentityPrivat /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareGlobalRea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_Delete.cs index 44b70aba1cdd..d91b54ea5769 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a IscsiPath")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareIscsiPath_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareIscsiPath_Delete : global::System.Management. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareIscsiPath /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -576,7 +562,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -600,7 +586,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_DeleteViaIdentity.cs index 7e3f4860ace8..482bd67b33e7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareIscsiPath_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a IscsiPath")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareIscsiPath_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwareIscsiPath_DeleteViaIdentity : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareIscsiPath /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -554,7 +540,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -578,7 +564,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_Delete.cs new file mode 100644 index 000000000000..e3e7db7b1385 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_Delete.cs @@ -0,0 +1,596 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Delete a License + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzVMwareLicense_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}", ApiVersion = "2025-09-01")] + public partial class RemoveAzVMwareLicense_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzVMwareLicense_Delete + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareLicense_Delete Clone() + { + var clone = new RemoveAzVMwareLicense_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PrivateCloudName = this.PrivateCloudName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LicensesDelete(SubscriptionId, ResourceGroupName, PrivateCloudName, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzVMwareLicense_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_DeleteViaIdentity.cs new file mode 100644 index 000000000000..9aaeb2d00682 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareLicense_DeleteViaIdentity.cs @@ -0,0 +1,574 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Delete a License + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzVMwareLicense_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}", ApiVersion = "2025-09-01")] + public partial class RemoveAzVMwareLicense_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzVMwareLicense_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareLicense_DeleteViaIdentity Clone() + { + var clone = new RemoveAzVMwareLicense_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LicensesDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LicensesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzVMwareLicense_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_Delete.cs index 1e319f59ad4a..6e1c13e8b607 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePlacementPolicy_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwarePlacementPolicy_Delete : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -291,11 +282,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,7 +593,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -631,7 +617,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentity.cs index 05298537aa25..c193300c5dd7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePlacementPolicy_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwarePlacementPolicy_DeleteViaIdentity : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,7 +548,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -586,7 +572,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityCluster.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityCluster.cs index 423b040f0610..2a5755773b96 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityCluster.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityCluster.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePlacementPolicy_DeleteViaIdentityCluster : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwarePlacementPolicy_DeleteViaIdentityCluster : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,7 +561,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -599,7 +585,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityPrivateCloud.cs index 90f5260ff927..372c1512a8f9 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePlacementPolicy_DeleteViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePlacementPolicy_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwarePlacementPolicy_DeleteViaIdentityPrivateCloud /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -251,11 +242,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -588,7 +574,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -612,7 +598,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_Delete.cs index 43e993b052d7..4dec3c05ec48 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePrivateCloud_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwarePrivateCloud_Delete : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePrivateCl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,7 +564,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -602,7 +588,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_DeleteViaIdentity.cs index f3af66091bec..1adbf7d23a0c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePrivateCloud_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PrivateCloud")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePrivateCloud_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwarePrivateCloud_DeleteViaIdentity : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePrivateCl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -555,7 +541,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -579,7 +565,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_Delete.cs index 2e83e51ae4c6..f3ea17c55306 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePureStoragePolicy_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwarePureStoragePolicy_Delete : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePureStora /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -591,7 +577,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -615,7 +601,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentity.cs index c28a103ae9e7..b9b7a1d64788 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePureStoragePolicy_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwarePureStoragePolicy_DeleteViaIdentity : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePureStora /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -558,7 +544,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -582,7 +568,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentityPrivateCloud.cs index 3076511f2078..0e7e6ccc1db3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwarePureStoragePolicy_DeleteViaIdentityPrivateCloud.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a PureStoragePolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwarePureStoragePolicy_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,15 +40,6 @@ public partial class RemoveAzVMwarePureStoragePolicy_DeleteViaIdentityPrivateClo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwarePureStora /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -573,7 +559,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -597,7 +583,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_Delete.cs index bba5c9b4ed69..0776240de149 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareScriptExecution_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareScriptExecution_Delete : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareScriptExe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -593,7 +579,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -617,7 +603,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentity.cs index 423030d2b3f2..43bc38f3d216 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareScriptExecution_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareScriptExecution_DeleteViaIdentity : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareScriptExe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -559,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -583,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentityPrivateCloud.cs index 5409679c7108..59dd99079c25 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareScriptExecution_DeleteViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a ScriptExecution")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareScriptExecution_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareScriptExecution_DeleteViaIdentityPrivateCloud /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareScriptExe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_Delete.cs index bf6b47aea930..da4b39fe2a3d 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDhcp_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDhcp_Delete : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentity.cs index ec46107886df..927f3ecd52c7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentity : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -559,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -583,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentityPrivateCloud.cs index bddc50423d9b..675a3633df4c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDhcp_DeleteViaIdentityPrivateC /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_Delete.cs index cc679882fe77..f66c32729b81 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDnsService_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDnsService_Delete : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentity.cs index 3fe6e4e42890..7bc7ab9fd42f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentity : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -561,7 +547,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -585,7 +571,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentityDnsService.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentityDnsService.cs index 01fb29646bec..5938b68fc544 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentityDnsService.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentityDnsService.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentityDnsService : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDnsService_DeleteViaIdentityDn /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_Delete.cs index d069aa853cd7..3cc8757c10d1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDnsZone_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDnsZone_Delete : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentity.cs index 7e33e6da3605..3e1b28526e66 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentity : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -559,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -583,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentityDnsZone.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentityDnsZone.cs index 0097322410c6..b22e8fd95aca 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentityDnsZone.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentityDnsZone.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentityDnsZone : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkDnsZone_DeleteViaIdentityDnsZo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_Delete.cs index 5365dc4c904c..db09571f7935 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkPortMirroring_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkPortMirroring_Delete : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentity.cs index 9bf47f350b07..c2cbb1d66af2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -561,7 +547,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -585,7 +571,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentityPortMirroringProfile.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentityPortMirroringProfile.cs index 283a8ab03e36..8d0b008ffa32 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentityPortMirroringProfile.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentityPortMirroringProfile.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentityPortMirroringProfile : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkPortMirroring_DeleteViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_Delete.cs index ed209c7601d2..164a106aeb94 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkPublicIP_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkPublicIP_Delete : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentity.cs index 94042d18573b..dbae44355d2c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentity : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -559,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -583,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentityPublicIP.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentityPublicIP.cs index a29db98fde98..0afdb0a3cc74 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentityPublicIP.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentityPublicIP.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkPublicIP")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentityPublicIP : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkPublicIP_DeleteViaIdentityPubl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_Delete.cs index 97bf72e985de..d6da31932dd2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkSegment_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkSegment_Delete : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentity.cs index 6bc0b5bae8c4..a0250b31a4a7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentity : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -559,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -583,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentityPrivateCloud.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentityPrivateCloud.cs index 6e82eeea8416..0c561d78ffbe 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentityPrivateCloud.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentityPrivateCloud.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentityPrivateCloud : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkSegment_DeleteViaIdentityPriva /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_Delete.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_Delete.cs index 595b029cadc8..91fde55e6a3a 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_Delete.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_Delete.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkVMGroup_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkVMGroup_Delete : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -616,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentity.cs index ca57d663bc8e..5c23fdafedc1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentity.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentity : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -559,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -583,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentityVMGroup.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentityVMGroup.cs index a75f2efeee10..4369d656f973 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentityVMGroup.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentityVMGroup.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Delete a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentityVMGroup : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class RemoveAzVMwareWorkloadNetworkVMGroup_DeleteViaIdentityVMGro /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.RemoveAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,7 +560,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -598,7 +584,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationQuotaAvailability_Check.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationQuotaAvailability_Check.cs index 950be349332d..9b1963730a8a 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationQuotaAvailability_Check.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationQuotaAvailability_Check.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IQuota))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return quota for subscription by region")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability", ApiVersion = "2025-09-01")] public partial class TestAzVMwareLocationQuotaAvailability_Check : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationTrialAvailability_CheckExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationTrialAvailability_CheckExpanded.cs index bb802f49c885..1dbba6fccd96 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationTrialAvailability_CheckExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareLocationTrialAvailability_CheckExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ITrial))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return trial status for subscription by region")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability", ApiVersion = "2025-09-01")] public partial class TestAzVMwareLocationTrialAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_Check.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_Check.cs new file mode 100644 index 000000000000..fa7efb6d506a --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_Check.cs @@ -0,0 +1,562 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Return service component availability + /// + /// [OpenAPI] CheckAvailability=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzVMwareServiceComponentAvailability_Check", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return service component availability")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability", ApiVersion = "2025-09-01")] + public partial class TestAzVMwareServiceComponentAvailability_Check : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _serviceComponentName; + + /// A service component + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A service component")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A service component", + SerializedName = @"serviceComponentName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ServiceComponentName { get => this._serviceComponentName; set => this._serviceComponentName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzVMwareServiceComponentAvailability_Check + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.TestAzVMwareServiceComponentAvailability_Check Clone() + { + var clone = new TestAzVMwareServiceComponentAvailability_Check(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.Location = this.Location; + clone.ServiceComponentName = this.ServiceComponentName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ServiceComponentsCheckAvailability' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ServiceComponentsCheckAvailability(SubscriptionId, Location, ServiceComponentName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.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,ServiceComponentName=ServiceComponentName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzVMwareServiceComponentAvailability_Check() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentity.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentity.cs new file mode 100644 index 000000000000..462251656ece --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentity.cs @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Return service component availability + /// + /// [OpenAPI] CheckAvailability=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzVMwareServiceComponentAvailability_CheckViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return service component availability")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability", ApiVersion = "2025-09-01")] + public partial class TestAzVMwareServiceComponentAvailability_CheckViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of TestAzVMwareServiceComponentAvailability_CheckViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.TestAzVMwareServiceComponentAvailability_CheckViaIdentity Clone() + { + var clone = new TestAzVMwareServiceComponentAvailability_CheckViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ServiceComponentsCheckAvailability' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ServiceComponentsCheckAvailabilityViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.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) ); + } + if (null == InputObject.ServiceComponentName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ServiceComponentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ServiceComponentsCheckAvailability(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.ServiceComponentName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzVMwareServiceComponentAvailability_CheckViaIdentity() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation.cs new file mode 100644 index 000000000000..5f066dfc9b1a --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation.cs @@ -0,0 +1,555 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// Return service component availability + /// + /// [OpenAPI] CheckAvailability=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzVMwareServiceComponentAvailability_CheckViaIdentityLocation", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"Return service component availability")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/serviceComponents/{serviceComponentName}/checkAvailability", ApiVersion = "2025-09-01")] + public partial class TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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 Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _serviceComponentName; + + /// A service component + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A service component")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A service component", + SerializedName = @"serviceComponentName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ServiceComponentName { get => this._serviceComponentName; set => this._serviceComponentName = 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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation Clone() + { + var clone = new TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ServiceComponentName = this.ServiceComponentName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ServiceComponentsCheckAvailability' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/serviceComponents/{(global::System.Uri.EscapeDataString(this.ServiceComponentName.ToString()))}"; + await this.Client.ServiceComponentsCheckAvailabilityViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.ServiceComponentsCheckAvailability(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, ServiceComponentName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ServiceComponentName=ServiceComponentName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public TestAzVMwareServiceComponentAvailability_CheckViaIdentityLocation() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateExpanded.cs index faa04c0638d4..e3bdbb4bde0f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareAuthorization_UpdateExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareAuthoriza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -606,24 +592,7 @@ private void Update_authorizationBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityExpanded.cs index 8cfc16e0500d..eeb42b3d8651 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareAuthorization_UpdateViaIdentityExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareAuthoriza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,24 +560,7 @@ private void Update_authorizationBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityPrivateCloudExpanded.cs index cf1db0862707..597f21a77731 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareAuthorization_UpdateViaIdentityPrivateCloudExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareAuthorization_UpdateViaIdentityPrivateCloudEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareAuthoriza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -590,24 +576,7 @@ private void Update_authorizationBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IExpressRouteAuthorization var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateExpanded.cs index 7006b142bd46..1d1643255108 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareCloudLink_UpdateExpanded : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareCloudLink /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -606,24 +592,7 @@ private void Update_cloudLinkBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityExpanded.cs index a9673b8a1886..e63a57ac0637 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareCloudLink_UpdateViaIdentityExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareCloudLink /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -574,24 +560,7 @@ private void Update_cloudLinkBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityPrivateCloudExpanded.cs index 5761dcae21ad..9b41412d12e2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCloudLink_UpdateViaIdentityPrivateCloudExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareCloudLink_UpdateViaIdentityPrivateCloudExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareCloudLink /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -590,24 +576,7 @@ private void Update_cloudLinkBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICloudLink var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateExpanded.cs index a0290a060b0b..499af8541500 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareCluster_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareCluster_UpdateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -354,11 +345,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareCluster_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -674,24 +660,7 @@ public UpdateAzVMwareCluster_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityExpanded.cs index 047e0e66aa8b..095fa20635a4 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareCluster_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareCluster_UpdateViaIdentityExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -296,11 +287,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareCluster_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -640,24 +626,7 @@ public UpdateAzVMwareCluster_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded.cs index c1a9acde060e..512cba450f9e 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a Cluster")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -314,11 +305,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareCluster_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -655,24 +641,7 @@ public UpdateAzVMwareCluster_UpdateViaIdentityPrivateCloudExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ICluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateExpanded.cs index e017ca3c66d2..f00d795859ad 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareDatastore_UpdateExpanded : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -360,11 +351,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -714,24 +700,7 @@ private void Update_datastoreBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityClusterExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityClusterExpanded.cs index 838735ee507a..55fbd58042df 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityClusterExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityClusterExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareDatastore_UpdateViaIdentityClusterExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -305,11 +296,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -686,24 +672,7 @@ private void Update_datastoreBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityExpanded.cs index 489982358fc7..7615cbc28be1 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareDatastore_UpdateViaIdentityExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -287,11 +278,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -671,24 +657,7 @@ private void Update_datastoreBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityPrivateCloudExpanded.cs index 5bfa93861444..2ae3a063a529 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareDatastore_UpdateViaIdentityPrivateCloudExpanded.cs @@ -43,15 +43,6 @@ public partial class UpdateAzVMwareDatastore_UpdateViaIdentityPrivateCloudExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -320,11 +311,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareDatastore /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -698,24 +684,7 @@ private void Update_datastoreBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IDatastore var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateExpanded.cs index 4d6f17d41424..5861606b1f31 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwareGlobalReachConnection_UpdateExpanded : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A global reach connection resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection _globalReachConnectionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.GlobalReachConnection(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -304,11 +295,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareGlobalRea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -642,24 +628,7 @@ private void Update_globalReachConnectionBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityExpanded.cs index 4313e1f008de..f5e0cf6280f3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A global reach connection resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection _globalReachConnectionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.GlobalReachConnection(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -248,11 +239,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareGlobalRea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,24 +599,7 @@ private void Update_globalReachConnectionBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityPrivateCloudExpanded.cs index d16cde3a1d75..583a827c438c 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityPrivateCloudExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwareGlobalReachConnection_UpdateViaIdentityPrivat /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A global reach connection resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection _globalReachConnectionBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.GlobalReachConnection(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareGlobalRea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -626,24 +612,7 @@ private void Update_globalReachConnectionBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IGlobalReachConnection var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateExpanded.cs index d76efc955263..6572572fb949 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwareIscsiPath_UpdateExpanded : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An iSCSI path resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IscsiPath(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -249,11 +240,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareIscsiPath /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -576,24 +562,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateViaIdentityExpanded.cs index 10d105a8f5b0..0603caaa15a3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareIscsiPath_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwareIscsiPath_UpdateViaIdentityExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An iSCSI path resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IscsiPath(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -207,11 +198,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareIscsiPath /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -556,24 +542,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IIscsiPath var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateExpanded.cs new file mode 100644 index 000000000000..c4775715b358 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateExpanded.cs @@ -0,0 +1,569 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// update a License + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVMwareLicense_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + public partial class UpdateAzVMwareLicense_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A license resource + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _privateCloudName; + + /// Name of the private cloud + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the private cloud")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the private cloud", + SerializedName = @"privateCloudName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string PrivateCloudName { get => this._privateCloudName; set => this._privateCloudName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzVMwareLicense_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareLicense_UpdateExpanded Clone() + { + var clone = new UpdateAzVMwareLicense_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PrivateCloudName = this.PrivateCloudName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + _resourceBody = await this.Client.LicensesGetWithResult(SubscriptionId, ResourceGroupName, PrivateCloudName, this, Pipeline); + this.Update_resourceBody(); + await this.Client.LicensesCreateOrUpdate(SubscriptionId, ResourceGroupName, PrivateCloudName, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PrivateCloudName=PrivateCloudName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzVMwareLicense_UpdateExpanded() + { + + } + + private void Update_resourceBody() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Models.ILicense + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..952fe3007185 --- /dev/null +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareLicense_UpdateViaIdentityExpanded.cs @@ -0,0 +1,549 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Cmdlets; + using System; + + /// update a License + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/licenses/{licenseName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzVMwareLicense_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense))] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a License")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] + public partial class UpdateAzVMwareLicense_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A license resource + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.License(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.VMware.VMware Client => Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVMwareIdentity 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.VMware.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzVMwareLicense_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareLicense_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzVMwareLicense_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.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. + /// 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.VMware.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.VMware.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'LicensesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + _resourceBody = await this.Client.LicensesGetViaIdentityWithResult(InputObject.Id, this, Pipeline); + this.Update_resourceBody(); + await this.Client.LicensesCreateOrUpdateViaIdentity(InputObject.Id, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PrivateCloudName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateCloudName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + _resourceBody = await this.Client.LicensesGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, this, Pipeline); + this.Update_resourceBody(); + await this.Client.LicensesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PrivateCloudName ?? null, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzVMwareLicense_UpdateViaIdentityExpanded() + { + + } + + private void Update_resourceBody() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.VMware.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.VMware.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILicense + /// 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.VMware.Models.ILicense + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateExpanded.cs index 686f3a84fc73..91a6419d3d1f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwarePlacementPolicy_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePlacementPolicy_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An update of a DRS placement policy resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate _placementPolicyUpdateBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicyUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// vm-host placement policy affinity strength (should/must) [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "vm-host placement policy affinity strength (should/must)")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] @@ -340,11 +331,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -660,24 +646,7 @@ public UpdateAzVMwarePlacementPolicy_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityClusterExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityClusterExpanded.cs index dd33e2787a3d..099f374f94fb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityClusterExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityClusterExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwarePlacementPolicy_UpdateViaIdentityClusterExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePlacementPolicy_UpdateViaIdentityClusterExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An update of a DRS placement policy resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate _placementPolicyUpdateBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicyUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// vm-host placement policy affinity strength (should/must) [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "vm-host placement policy affinity strength (should/must)")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -631,24 +617,7 @@ public UpdateAzVMwarePlacementPolicy_UpdateViaIdentityClusterExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityExpanded.cs index c8cd42f99f40..3f841f6af9ac 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwarePlacementPolicy_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePlacementPolicy_UpdateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An update of a DRS placement policy resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate _placementPolicyUpdateBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicyUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// vm-host placement policy affinity strength (should/must) [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "vm-host placement policy affinity strength (should/must)")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] @@ -267,11 +258,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -615,24 +601,7 @@ public UpdateAzVMwarePlacementPolicy_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloudExpanded.cs index 9ea874ffbd80..7eecb4f63981 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloudExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a PlacementPolicy")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloud /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An update of a DRS placement policy resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicyUpdate _placementPolicyUpdateBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PlacementPolicyUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// vm-host placement policy affinity strength (should/must) [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "vm-host placement policy affinity strength (should/must)")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Body)] @@ -300,11 +291,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePlacement /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -642,24 +628,7 @@ public UpdateAzVMwarePlacementPolicy_UpdateViaIdentityPrivateCloudExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPlacementPolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateExpanded.cs index 9211a7f33f6b..c81a0ea319f3 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePrivateCloud_UpdateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A private cloud resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud _privateCloudBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PrivateCloud(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -510,11 +501,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePrivateCl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -944,24 +930,7 @@ private void Update_privateCloudBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateViaIdentityExpanded.cs index 3a7115981e97..e72aa6712745 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePrivateCloud_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePrivateCloud_UpdateViaIdentityExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A private cloud resource private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud _privateCloudBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PrivateCloud(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -467,11 +458,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePrivateCl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -924,24 +910,7 @@ private void Update_privateCloudBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPrivateCloud var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateExpanded.cs index fcfb84726f7a..93a641a4febf 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePureStoragePolicy_UpdateExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An instance describing a Pure Storage Policy Based Management policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PureStoragePolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -286,11 +277,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePureStora /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -620,24 +606,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityExpanded.cs index 794d655f001c..ac92630ed556 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An instance describing a Pure Storage Policy Based Management policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PureStoragePolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -231,11 +222,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePureStora /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -591,24 +577,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityPrivateCloudExpanded.cs index c442aa9e246e..4ab7fa041dfb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityPrivateCloudExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzVMwarePureStoragePolicy_UpdateViaIdentityPrivateClo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An instance describing a Pure Storage Policy Based Management policy private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.PureStoragePolicy(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Category(global::Microsoft.Azure.PowerShell.Cmdlets.VMware.ParameterCategory.Runtime)] @@ -246,11 +237,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwarePureStora /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -604,24 +590,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IPureStoragePolicy var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateExpanded.cs index 98039c5c5a17..e2e15726a341 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDhcp_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDhcp_UpdateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DHCP private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp _workloadNetworkDhcpBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDhcp(); @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -619,24 +605,7 @@ public UpdateAzVMwareWorkloadNetworkDhcp_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityExpanded.cs index 2370054e028b..d452cb689064 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DHCP private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp _workloadNetworkDhcpBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDhcp(); @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -588,24 +574,7 @@ public UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityPrivateCloudExpanded.cs index 7ea5b2f0b5fd..bf3f54b2457d 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDhcp")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityPrivateC /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DHCP private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp _workloadNetworkDhcpBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDhcp(); @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ public UpdateAzVMwareWorkloadNetworkDhcp_UpdateViaIdentityPrivateCloudExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDhcp var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateExpanded.cs index 49409f9a00ef..66a231a738b7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDnsService_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDnsService_UpdateExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Service private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService _workloadNetworkDnsServiceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsService(); @@ -333,11 +324,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -653,24 +639,7 @@ public UpdateAzVMwareWorkloadNetworkDnsService_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityExpanded.cs index d556f0b5bd1f..9f1641dc9809 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Service private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService _workloadNetworkDnsServiceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsService(); @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ public UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityPrivateCloudExpanded.cs index f5f29ab79357..c7202864b2ab 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDnsService")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityPr /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Service private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService _workloadNetworkDnsServiceBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsService(); @@ -293,11 +284,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -635,24 +621,7 @@ public UpdateAzVMwareWorkloadNetworkDnsService_UpdateViaIdentityPrivateCloudExpa // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateExpanded.cs index 0c7206414cb7..3a0ea8534d8f 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDnsZone_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDnsZone_UpdateExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Zone private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone _workloadNetworkDnsZoneBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsZone(); @@ -333,11 +324,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -653,24 +639,7 @@ public UpdateAzVMwareWorkloadNetworkDnsZone_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityExpanded.cs index 1c78872e0370..ece7a78d72b7 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Zone private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone _workloadNetworkDnsZoneBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsZone(); @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ public UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityPrivateCloudExpanded.cs index dd1481e381d0..11a853e12592 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkDnsZone")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityPriva /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX DNS Zone private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone _workloadNetworkDnsZoneBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkDnsZone(); @@ -293,11 +284,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -635,24 +621,7 @@ public UpdateAzVMwareWorkloadNetworkDnsZone_UpdateViaIdentityPrivateCloudExpande // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkDnsZone var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateExpanded.cs index 1d4199b6f657..8f0d3371fd87 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Port Mirroring private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring _workloadNetworkPortMirroringBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPortMirroring(); @@ -323,11 +314,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -643,24 +629,7 @@ public UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityExpanded.cs index 522b63f3b32e..90872239bca2 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Port Mirroring private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring _workloadNetworkPortMirroringBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPortMirroring(); @@ -266,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -611,24 +597,7 @@ public UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityPrivateCloudExpanded.cs index 24e2915073e4..966cbdad2f47 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkPortMirroring")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Port Mirroring private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring _workloadNetworkPortMirroringBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkPortMirroring(); @@ -281,11 +272,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ public UpdateAzVMwareWorkloadNetworkPortMirroring_UpdateViaIdentityPrivateCloudE // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkPortMirroring var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateExpanded.cs index 2a2783e1ad2c..9d39e0751346 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkSegment_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkSegment_UpdateExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Segment private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment _workloadNetworkSegmentBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkSegment(); @@ -321,11 +312,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ public UpdateAzVMwareWorkloadNetworkSegment_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityExpanded.cs index cb0bbb6600e0..6a2b21bb7f3a 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Segment private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment _workloadNetworkSegmentBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkSegment(); @@ -266,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -611,24 +597,7 @@ public UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityPrivateCloudExpanded.cs index b8e7e297cdff..9bdd973a2192 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkSegment")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityPriva /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX Segment private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment _workloadNetworkSegmentBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkSegment(); @@ -281,11 +272,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ public UpdateAzVMwareWorkloadNetworkSegment_UpdateViaIdentityPrivateCloudExpande // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkSegment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateExpanded.cs index 33731c7dffb1..de588db21ccb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkVMGroup_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkVMGroup_UpdateExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX VM Group private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup _workloadNetworkVMGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkVMGroup(); @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -619,24 +605,7 @@ public UpdateAzVMwareWorkloadNetworkVMGroup_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityExpanded.cs index 1b351df861fc..d9a9d19058cb 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX VM Group private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup _workloadNetworkVMGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkVMGroup(); @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -589,24 +575,7 @@ public UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityPrivateCloudExpanded.cs b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityPrivateCloudExpanded.cs index f4a70c404f19..ab73c6355d24 100644 --- a/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityPrivateCloudExpanded.cs +++ b/generated/VMware/VMware.Autorest/generated/cmdlets/UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityPrivateCloudExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Description(@"update a WorkloadNetworkVMGroup")] [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2024-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.VMware.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", ApiVersion = "2025-09-01")] public partial class UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityPrivateCloudExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.IContext @@ -41,15 +41,6 @@ public partial class UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityPriva /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// NSX VM Group private Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup _workloadNetworkVMGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.WorkloadNetworkVMGroup(); @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.VMware.Cmdlets.UpdateAzVMwareWorkloadN /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.VMware.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ public UpdateAzVMwareWorkloadNetworkVMGroup_UpdateViaIdentityPrivateCloudExpande // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IWorkloadNetworkVMGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/generated/VMware/VMware.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/VMware/VMware.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 429844e0662f..7537c5cfd5be 100644 --- a/generated/VMware/VMware.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/VMware/VMware.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) { return $@" {Indent}{Indent}$context = Get-AzContext {Indent}{Indent}if (-not $context -and -not $testPlayback) {{ -{Indent}{Indent}{Indent}Write-Error ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" -{Indent}{Indent}{Indent}exit +{Indent}{Indent}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/VMware/VMware.Autorest/generated/runtime/Context.cs b/generated/VMware/VMware.Autorest/generated/runtime/Context.cs index c6517f9d78aa..9dd8d55f8460 100644 --- a/generated/VMware/VMware.Autorest/generated/runtime/Context.cs +++ b/generated/VMware/VMware.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareAddon.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareAddon.ps1 index dd24e9f4058c..4da267eed4ef 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareAddon.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareAddon.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptCmdlet.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptCmdlet.ps1 index e7df6085fa77..08e3fbf4b2ec 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptCmdlet.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptCmdlet.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ SCRIPTPACKAGEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ SCRIPTPACKAGEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecution.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecution.ps1 index 77e84963f139..b47675ef8049 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecution.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecution.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecutionLog.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecutionLog.ps1 index 35d9b46a3a7b..bbbf410d7583 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecutionLog.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptExecutionLog.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptPackage.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptPackage.ps1 index f19306656a60..c51ff0d5d7e7 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptPackage.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareScriptPackage.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetwork.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetwork.ps1 index 425ffa29b899..fd9d6cc8e226 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetwork.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetwork.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDhcp.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDhcp.ps1 index 19aba1e47e5c..070abb25bc9b 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDhcp.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDhcp.ps1 @@ -47,7 +47,9 @@ DHCPCONFIGURATIONINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ DHCPCONFIGURATIONINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsService.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsService.ps1 index 81f5f9f228d8..18f5b645fbb3 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsService.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsService.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsZone.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsZone.ps1 index d90dc9408635..b2e73b8d6edf 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsZone.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkDnsZone.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkGateway.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkGateway.ps1 index df05730ea7cd..48af045485f4 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkGateway.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkGateway.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPortMirroring.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPortMirroring.ps1 index 4b3d5cdc6543..19eab2477105 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPortMirroring.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPortMirroring.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPublicIP.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPublicIP.ps1 index c0c74ab0a5d6..e30e2942f35f 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPublicIP.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkPublicIP.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkSegment.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkSegment.ps1 index 778c1e181052..0da81e0ac00d 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkSegment.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkSegment.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVM.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVM.ps1 index cc9878fd6d95..4c305172117c 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVM.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVM.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVMGroup.ps1 b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVMGroup.ps1 index ac4e271f88c1..ad2d8c054df0 100644 --- a/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVMGroup.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Get-AzVMwareWorkloadNetworkVMGroup.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Lock-AzVMwareVirtualMachineMovement.ps1 b/generated/VMware/VMware.Autorest/internal/Lock-AzVMwareVirtualMachineMovement.ps1 index da3f419af45e..e8f95fbe2423 100644 --- a/generated/VMware/VMware.Autorest/internal/Lock-AzVMwareVirtualMachineMovement.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Lock-AzVMwareVirtualMachineMovement.ps1 @@ -47,7 +47,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -107,7 +113,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -118,6 +126,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareAddon.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareAddon.ps1 index b9e56ce010d3..257fce735257 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareAddon.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareAddon.ps1 @@ -46,7 +46,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -57,6 +59,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -76,7 +79,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -87,6 +92,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareScriptExecution.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareScriptExecution.ps1 index 06379bf913de..7e7dbf3b15b7 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareScriptExecution.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareScriptExecution.ps1 @@ -51,7 +51,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -62,6 +64,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -85,7 +88,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -96,6 +101,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDhcp.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDhcp.ps1 index 5d9dd0f9517c..1f0306bd5d91 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDhcp.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDhcp.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsService.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsService.ps1 index 51c888d8b182..ae1aa6aa2917 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsService.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsService.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsZone.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsZone.ps1 index f69e73fdf5ad..97a24ef4b300 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsZone.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkDnsZone.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPortMirroring.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPortMirroring.ps1 index 6c36b2c7fad9..fc96809a956f 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPortMirroring.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPortMirroring.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPublicIP.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPublicIP.ps1 index 37da62fffa4e..5a37640ef83b 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPublicIP.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkPublicIP.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkSegment.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkSegment.ps1 index 3d69ef695a56..6c33d1c9dada 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkSegment.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkSegment.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkVMGroup.ps1 b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkVMGroup.ps1 index 7a04c9bf8f42..d7b5a80d3dbe 100644 --- a/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkVMGroup.ps1 +++ b/generated/VMware/VMware.Autorest/internal/New-AzVMwareWorkloadNetworkVMGroup.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/VMware/VMware.Autorest/internal/ProxyCmdletDefinitions.ps1 index 3d59df1d074c..8f1b4c9dfdd3 100644 --- a/generated/VMware/VMware.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/VMware/VMware.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -399,7 +405,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -410,6 +418,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -429,7 +438,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -440,6 +451,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -459,7 +471,9 @@ SCRIPTPACKAGEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -470,6 +484,7 @@ SCRIPTPACKAGEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -683,7 +698,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -694,6 +711,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -713,7 +731,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -724,6 +744,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -923,7 +944,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -934,6 +957,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -953,7 +977,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -964,6 +990,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1159,7 +1186,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1170,6 +1199,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1189,7 +1219,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1200,6 +1232,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1395,7 +1428,9 @@ DHCPCONFIGURATIONINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1406,6 +1441,7 @@ DHCPCONFIGURATIONINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1425,7 +1461,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1436,6 +1474,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1630,7 +1669,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1641,6 +1682,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1660,7 +1702,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1671,6 +1715,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1865,7 +1910,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1876,6 +1923,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -1895,7 +1943,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -1906,6 +1956,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2100,7 +2151,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2111,6 +2164,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2130,7 +2184,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2141,6 +2197,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2335,7 +2392,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2346,6 +2405,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2365,7 +2425,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2376,6 +2438,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2570,7 +2633,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2581,6 +2646,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2600,7 +2666,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2611,6 +2679,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2805,7 +2874,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2816,6 +2887,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -2835,7 +2907,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -2846,6 +2920,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3040,7 +3115,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3051,6 +3128,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3070,7 +3148,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3081,6 +3161,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3275,7 +3356,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3286,6 +3369,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3305,7 +3389,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3316,6 +3402,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3510,7 +3597,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3521,6 +3610,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3701,7 +3791,9 @@ CLUSTERINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3712,6 +3804,7 @@ CLUSTERINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3731,7 +3824,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3742,6 +3837,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -3761,7 +3857,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -3772,6 +3870,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4001,7 +4100,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4012,6 +4113,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4031,7 +4133,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4042,6 +4146,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4609,7 +4714,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4620,6 +4727,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4643,7 +4751,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4654,6 +4764,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4910,7 +5021,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4921,6 +5034,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -4940,7 +5054,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -4951,6 +5067,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5172,7 +5289,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5183,6 +5302,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5202,7 +5322,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5213,6 +5335,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5453,7 +5576,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5464,6 +5589,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5483,7 +5609,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5494,6 +5622,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5734,7 +5863,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5745,6 +5876,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -5764,7 +5896,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -5775,6 +5909,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6008,7 +6143,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6019,6 +6156,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6038,7 +6176,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6049,6 +6189,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6263,7 +6404,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6274,6 +6417,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6293,7 +6437,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6304,6 +6450,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6537,7 +6684,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6548,6 +6697,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6567,7 +6717,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6578,6 +6730,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6801,7 +6954,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6812,6 +6967,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -6831,7 +6987,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -6842,6 +7000,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7053,7 +7212,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7064,6 +7225,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7259,7 +7421,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7270,6 +7434,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7289,7 +7454,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7300,6 +7467,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7509,7 +7677,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7520,6 +7690,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7539,7 +7710,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7550,6 +7723,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7758,7 +7932,9 @@ DNSSERVICEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7769,6 +7945,7 @@ DNSSERVICEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -7788,7 +7965,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -7799,6 +7978,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8007,7 +8187,9 @@ DNSZONEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8018,6 +8200,7 @@ DNSZONEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8037,7 +8220,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8048,6 +8233,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8256,7 +8442,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8267,6 +8455,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8286,7 +8475,9 @@ PORTMIRRORINGPROFILEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8297,6 +8488,7 @@ PORTMIRRORINGPROFILEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8505,7 +8697,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8516,6 +8710,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8535,7 +8730,9 @@ PUBLICIPINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8546,6 +8743,7 @@ PUBLICIPINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8754,7 +8952,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8765,6 +8965,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -8784,7 +8985,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -8795,6 +8998,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9003,7 +9207,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9014,6 +9220,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9033,7 +9240,9 @@ VMGROUPINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9044,6 +9253,7 @@ VMGROUPINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9252,7 +9462,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9263,6 +9475,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9282,7 +9495,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9293,6 +9508,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9514,7 +9730,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9525,6 +9743,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9544,7 +9763,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9555,6 +9776,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9795,7 +10017,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9806,6 +10030,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -9825,7 +10050,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -9836,6 +10063,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10076,7 +10304,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10087,6 +10317,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10106,7 +10337,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10117,6 +10350,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10350,7 +10584,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10361,6 +10597,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10380,7 +10617,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10391,6 +10630,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10624,7 +10864,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10635,6 +10877,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -10654,7 +10897,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -10665,6 +10910,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareAddon.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareAddon.ps1 index 84c7e09973d5..ffbc893cf904 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareAddon.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareAddon.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -79,7 +82,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -90,6 +95,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwarePrivateCloud.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwarePrivateCloud.ps1 index 3ea7e33cb199..2db3bac56c65 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwarePrivateCloud.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwarePrivateCloud.ps1 @@ -49,7 +49,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -60,6 +62,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareScriptExecution.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareScriptExecution.ps1 index 4ee957ed2579..3c7bd93a0f58 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareScriptExecution.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareScriptExecution.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDhcp.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDhcp.ps1 index f6c68dc84c77..56052f842773 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDhcp.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDhcp.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsService.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsService.ps1 index cb051aeb683b..88f2238f7881 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsService.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsService.ps1 @@ -47,7 +47,9 @@ DNSSERVICEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ DNSSERVICEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsZone.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsZone.ps1 index 5e42963c086f..de8d62e60e64 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsZone.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkDnsZone.ps1 @@ -47,7 +47,9 @@ DNSZONEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ DNSZONEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPortMirroring.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPortMirroring.ps1 index 1d97f69d7343..95253abc99bb 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPortMirroring.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPortMirroring.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PORTMIRRORINGPROFILEINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PORTMIRRORINGPROFILEINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPublicIP.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPublicIP.ps1 index 7d2a5488f857..e71fa7eeecc8 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPublicIP.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkPublicIP.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PUBLICIPINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PUBLICIPINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkSegment.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkSegment.ps1 index 739328b41071..f66cd15d73cb 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkSegment.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkSegment.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkVMGroup.ps1 b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkVMGroup.ps1 index e3f18ed30d05..0b7df3940092 100644 --- a/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkVMGroup.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Remove-AzVMwareWorkloadNetworkVMGroup.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ VMGROUPINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ VMGROUPINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDhcp.ps1 b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDhcp.ps1 index 3096db694e82..da4ef87bab2e 100644 --- a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDhcp.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDhcp.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsService.ps1 b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsService.ps1 index eba5cb2a9867..d40554b8febc 100644 --- a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsService.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsService.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsZone.ps1 b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsZone.ps1 index 430b30ff21ad..9f3620919371 100644 --- a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsZone.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkDnsZone.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkPortMirroring.ps1 b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkPortMirroring.ps1 index 0ec00d8604b5..d61b52ecc99a 100644 --- a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkPortMirroring.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkPortMirroring.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkSegment.ps1 b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkSegment.ps1 index cfb47451d4e6..68602bbbe1c4 100644 --- a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkSegment.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkSegment.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. diff --git a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkVMGroup.ps1 b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkVMGroup.ps1 index f96ff0063243..c48fc77e8432 100644 --- a/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkVMGroup.ps1 +++ b/generated/VMware/VMware.Autorest/internal/Update-AzVMwareWorkloadNetworkVMGroup.ps1 @@ -47,7 +47,9 @@ INPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -58,6 +60,7 @@ INPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group. @@ -77,7 +80,9 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [HcxEnterpriseSiteName ]: Name of the HCX Enterprise Site [HostId ]: The host identifier. [Id ]: Resource identity path + [LicenseName ]: Name of the license. [Location ]: The name of the Azure region. + [MaintenanceName ]: Name of the maintenance [PlacementPolicyName ]: Name of the placement policy. [PortMirroringId ]: ID of the NSX port mirroring profile. [PrivateCloudName ]: Name of the private cloud @@ -88,6 +93,7 @@ PRIVATECLOUDINPUTOBJECT : Identity Parameter [ScriptExecutionName ]: Name of the script cmdlet. [ScriptPackageName ]: Name of the script package. [SegmentId ]: The ID of the NSX Segment + [ServiceComponentName ]: A service component [StoragePolicyName ]: Name of the storage policy. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [VMGroupId ]: ID of the VM group.