From 8e7038c3eba4d4ac56fefff1146046dbb1b86142 Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Wed, 24 Feb 2021 17:32:30 +0800 Subject: [PATCH] Move ResourceMover to release-2021-03-02 (#14310) Co-authored-by: Dingmeng Xue --- .../Az.ResourceMover.format.ps1xml | 544 +++++-- src/ResourceMover/Az.ResourceMover.psd1 | 12 +- src/ResourceMover/Az.ResourceMover.psm1 | 10 +- src/ResourceMover/Changelog.md | 3 + src/ResourceMover/build-module.ps1 | 2 +- src/ResourceMover/check-dependencies.ps1 | 4 +- src/ResourceMover/custom/readme.md | 8 +- .../Add-AzResourceMoverMoveResource.md | 138 +- .../Get-AzResourceMoverMoveCollection.md | 30 +- .../Get-AzResourceMoverMoveResource.md | 331 ++-- ...Get-AzResourceMoverRequiredForResources.md | 11 + ...Get-AzResourceMoverUnresolvedDependency.md | 17 +- .../Invoke-AzResourceMoverBulkRemove.md | 57 + .../examples/Invoke-AzResourceMoverCommit.md | 83 +- .../examples/Invoke-AzResourceMoverDiscard.md | 76 +- .../Invoke-AzResourceMoverInitiateMove.md | 78 +- .../examples/Invoke-AzResourceMoverPrepare.md | 65 +- .../New-AzResourceMoverMoveCollection.md | 10 +- .../Remove-AzResourceMoverMoveCollection.md | 28 +- .../Remove-AzResourceMoverMoveResource.md | 28 +- ...AzResourceMoverMoveCollectionDependency.md | 24 +- .../Add-AzResourceMoverMoveResource.ps1 | 164 +- .../Get-AzResourceMoverMoveCollection.ps1 | 34 +- .../Get-AzResourceMoverMoveResource.ps1 | 337 ++-- ...et-AzResourceMoverRequiredForResources.ps1 | 148 ++ ...et-AzResourceMoverUnresolvedDependency.ps1 | 40 +- .../Invoke-AzResourceMoverBulkRemove.ps1 | 213 +++ .../exports/Invoke-AzResourceMoverCommit.ps1 | 79 +- .../exports/Invoke-AzResourceMoverDiscard.ps1 | 78 +- .../Invoke-AzResourceMoverInitiateMove.ps1 | 80 +- .../exports/Invoke-AzResourceMoverPrepare.ps1 | 65 +- .../New-AzResourceMoverMoveCollection.ps1 | 18 +- .../exports/ProxyCmdletDefinitions.ps1 | 1332 +++++++++++----- .../Remove-AzResourceMoverMoveCollection.ps1 | 32 +- .../Remove-AzResourceMoverMoveResource.ps1 | 30 +- ...zResourceMoverMoveCollectionDependency.ps1 | 26 +- src/ResourceMover/generate-info.json | 12 +- ...erties.PowerShell.cs => Any.PowerShell.cs} | 95 +- ....TypeConverter.cs => Any.TypeConverter.cs} | 31 +- src/ResourceMover/generated/api/Models/Any.cs | 34 + .../generated/api/Models/Any.json.cs | 102 ++ .../MoveCollection.PowerShell.cs | 157 -- .../Api20191001Preview/MoveCollection.cs | 234 --- .../MoveCollectionProperties.PowerShell.cs | 137 -- .../MoveCollectionProperties.cs | 83 - .../MoveResource.PowerShell.cs | 197 --- .../MoveResourceCollection.cs | 63 - .../MoveResourceProperties.PowerShell.cs | 191 --- ...ResourcePropertiesMoveStatus.PowerShell.cs | 153 -- .../MoveResourceStatus.PowerShell.cs | 153 -- ...onfigurationResourceSettings.PowerShell.cs | 147 -- .../OperationStatus.PowerShell.cs | 153 -- .../OperationStatusProperties.cs | 29 - .../OperationsDiscoveryProperties.cs | 29 - .../SubnetResourceSettings.cs | 63 - .../UnresolvedDependencyCollection.cs | 63 - .../AffectedMoveResource.PowerShell.cs | 34 +- .../AffectedMoveResource.TypeConverter.cs | 6 +- .../AffectedMoveResource.cs | 22 +- .../AffectedMoveResource.json.cs | 18 +- ...utomaticResolutionProperties.PowerShell.cs | 24 +- ...maticResolutionProperties.TypeConverter.cs | 6 +- .../AutomaticResolutionProperties.cs | 6 +- .../AutomaticResolutionProperties.json.cs | 8 +- ...ilabilitySetResourceSettings.PowerShell.cs | 36 +- ...bilitySetResourceSettings.TypeConverter.cs | 6 +- .../AvailabilitySetResourceSettings.cs | 18 +- .../AvailabilitySetResourceSettings.json.cs | 10 +- .../AzureResourceReference.PowerShell.cs | 26 +- .../AzureResourceReference.TypeConverter.cs | 6 +- .../AzureResourceReference.cs | 6 +- .../AzureResourceReference.json.cs | 8 +- .../Api202101/BulkRemoveRequest.PowerShell.cs | 135 ++ .../BulkRemoveRequest.TypeConverter.cs} | 26 +- .../api/Models/Api202101/BulkRemoveRequest.cs | 95 ++ .../Api202101/BulkRemoveRequest.json.cs | 113 ++ .../CloudError.PowerShell.cs | 40 +- .../CloudError.TypeConverter.cs | 6 +- .../CloudError.cs | 28 +- .../CloudError.json.cs | 10 +- .../CloudErrorBody.PowerShell.cs | 38 +- .../CloudErrorBody.TypeConverter.cs | 6 +- .../CloudErrorBody.cs | 16 +- .../CloudErrorBody.json.cs | 10 +- .../CommitRequest.PowerShell.cs | 32 +- .../CommitRequest.TypeConverter.cs | 6 +- .../CommitRequest.cs | 6 +- .../CommitRequest.json.cs | 16 +- .../DiscardRequest.PowerShell.cs | 34 +- .../DiscardRequest.TypeConverter.cs | 6 +- .../DiscardRequest.cs | 6 +- .../DiscardRequest.json.cs | 16 +- ...cryptionSetResourceSettings.PowerShell.cs} | 61 +- ...yptionSetResourceSettings.TypeConverter.cs | 142 ++ .../DiskEncryptionSetResourceSettings.cs} | 36 +- ...DiskEncryptionSetResourceSettings.json.cs} | 43 +- .../Display.PowerShell.cs | 36 +- .../Display.TypeConverter.cs | 6 +- .../Display.cs | 6 +- .../Display.json.cs | 16 +- .../Identity.PowerShell.cs | 32 +- .../Identity.TypeConverter.cs | 6 +- .../Identity.cs | 14 +- .../Identity.json.cs | 8 +- .../JobStatus.PowerShell.cs | 28 +- .../JobStatus.TypeConverter.cs | 6 +- .../JobStatus.cs | 10 +- .../JobStatus.json.cs | 8 +- .../KeyVaultResourceSettings.PowerShell.cs} | 50 +- .../KeyVaultResourceSettings.TypeConverter.cs | 142 ++ .../Api202101/KeyVaultResourceSettings.cs | 58 + .../KeyVaultResourceSettings.json.cs} | 24 +- ...dAddressPoolResourceSettings.PowerShell.cs | 24 +- ...dressPoolResourceSettings.TypeConverter.cs | 6 +- .../LbBackendAddressPoolResourceSettings.cs | 6 +- ...BackendAddressPoolResourceSettings.json.cs | 8 +- ...onfigurationResourceSettings.PowerShell.cs | 48 +- ...igurationResourceSettings.TypeConverter.cs | 6 +- ...FrontendIpconfigurationResourceSettings.cs | 24 +- ...endIpconfigurationResourceSettings.json.cs | 10 +- ...rBackendAddressPoolReference.PowerShell.cs | 28 +- ...ckendAddressPoolReference.TypeConverter.cs | 6 +- ...LoadBalancerBackendAddressPoolReference.cs | 18 +- ...alancerBackendAddressPoolReference.json.cs | 10 +- ...LoadBalancerNatRuleReference.PowerShell.cs | 28 +- ...dBalancerNatRuleReference.TypeConverter.cs | 6 +- .../LoadBalancerNatRuleReference.cs | 18 +- .../LoadBalancerNatRuleReference.json.cs | 10 +- ...LoadBalancerResourceSettings.PowerShell.cs | 44 +- ...dBalancerResourceSettings.TypeConverter.cs | 6 +- .../LoadBalancerResourceSettings.cs | 38 +- .../LoadBalancerResourceSettings.json.cs | 28 +- .../ManualResolutionProperties.PowerShell.cs | 24 +- ...anualResolutionProperties.TypeConverter.cs | 6 +- .../ManualResolutionProperties.cs | 6 +- .../ManualResolutionProperties.json.cs | 8 +- .../Api202101/MoveCollection.PowerShell.cs | 169 ++ .../MoveCollection.TypeConverter.cs | 6 +- .../api/Models/Api202101/MoveCollection.cs | 350 ++++ .../MoveCollection.json.cs | 25 +- .../MoveCollectionProperties.PowerShell.cs | 149 ++ .../MoveCollectionProperties.TypeConverter.cs | 6 +- .../Api202101/MoveCollectionProperties.cs | 186 +++ .../MoveCollectionProperties.json.cs | 17 +- ...veCollectionPropertiesErrors.PowerShell.cs | 141 ++ ...ollectionPropertiesErrors.TypeConverter.cs | 142 ++ .../MoveCollectionPropertiesErrors.cs | 86 + .../MoveCollectionPropertiesErrors.json.cs | 101 ++ .../MoveCollectionResultList.PowerShell.cs | 28 +- .../MoveCollectionResultList.TypeConverter.cs | 6 +- .../MoveCollectionResultList.cs | 16 +- .../MoveCollectionResultList.json.cs | 12 +- .../MoveCollectionTags.PowerShell.cs | 22 +- .../MoveCollectionTags.TypeConverter.cs | 6 +- .../MoveCollectionTags.cs | 6 +- .../MoveCollectionTags.dictionary.cs | 4 +- .../MoveCollectionTags.json.cs | 8 +- .../MoveErrorInfo.PowerShell.cs | 24 +- .../MoveErrorInfo.TypeConverter.cs | 6 +- .../MoveErrorInfo.cs | 18 +- .../MoveErrorInfo.json.cs | 10 +- .../Api202101/MoveResource.PowerShell.cs | 189 +++ .../MoveResource.TypeConverter.cs | 6 +- .../MoveResource.cs | 381 ++--- .../MoveResource.json.cs | 18 +- .../MoveResourceCollection.PowerShell.cs | 38 +- .../MoveResourceCollection.TypeConverter.cs | 6 +- .../Api202101/MoveResourceCollection.cs | 123 ++ .../MoveResourceCollection.json.cs | 19 +- .../MoveResourceDependency.PowerShell.cs | 58 +- .../MoveResourceDependency.TypeConverter.cs | 6 +- .../MoveResourceDependency.cs | 26 +- .../MoveResourceDependency.json.cs | 22 +- ...veResourceDependencyOverride.PowerShell.cs | 28 +- ...esourceDependencyOverride.TypeConverter.cs | 6 +- .../MoveResourceDependencyOverride.cs | 6 +- .../MoveResourceDependencyOverride.json.cs | 8 +- .../MoveResourceError.PowerShell.cs | 46 +- .../MoveResourceError.TypeConverter.cs | 6 +- .../MoveResourceError.cs | 42 +- .../MoveResourceError.json.cs | 12 +- .../MoveResourceErrorBody.PowerShell.cs | 38 +- .../MoveResourceErrorBody.TypeConverter.cs | 6 +- .../MoveResourceErrorBody.cs | 24 +- .../MoveResourceErrorBody.json.cs | 10 +- .../MoveResourceFilter.PowerShell.cs | 30 +- .../MoveResourceFilter.TypeConverter.cs | 6 +- .../MoveResourceFilter.cs | 16 +- .../MoveResourceFilter.json.cs | 10 +- ...MoveResourceFilterProperties.PowerShell.cs | 24 +- ...eResourceFilterProperties.TypeConverter.cs | 6 +- .../MoveResourceFilterProperties.cs | 6 +- .../MoveResourceFilterProperties.json.cs | 8 +- .../MoveResourceProperties.PowerShell.cs | 181 +++ .../MoveResourceProperties.TypeConverter.cs | 6 +- .../MoveResourceProperties.cs | 380 ++--- .../MoveResourceProperties.json.cs | 43 +- ...MoveResourcePropertiesErrors.PowerShell.cs | 40 +- ...eResourcePropertiesErrors.TypeConverter.cs | 6 +- .../MoveResourcePropertiesErrors.cs | 32 +- .../MoveResourcePropertiesErrors.json.cs | 10 +- ...ResourcePropertiesMoveStatus.PowerShell.cs | 151 ++ ...ourcePropertiesMoveStatus.TypeConverter.cs | 6 +- .../MoveResourcePropertiesMoveStatus.cs | 57 +- .../MoveResourcePropertiesMoveStatus.json.cs | 10 +- .../MoveResourceStatus.PowerShell.cs | 149 ++ .../MoveResourceStatus.TypeConverter.cs | 6 +- .../MoveResourceStatus.cs | 82 +- .../MoveResourceStatus.json.cs | 19 +- ...orkInterfaceResourceSettings.PowerShell.cs | 36 +- ...InterfaceResourceSettings.TypeConverter.cs | 6 +- .../NetworkInterfaceResourceSettings.cs | 28 +- .../NetworkInterfaceResourceSettings.json.cs | 14 +- ...ecurityGroupResourceSettings.PowerShell.cs | 32 +- ...rityGroupResourceSettings.TypeConverter.cs | 6 +- .../NetworkSecurityGroupResourceSettings.cs | 28 +- ...tworkSecurityGroupResourceSettings.json.cs | 12 +- ...onfigurationResourceSettings.PowerShell.cs | 153 ++ ...igurationResourceSettings.TypeConverter.cs | 6 +- .../NicIPConfigurationResourceSettings.cs | 77 +- ...NicIPConfigurationResourceSettings.json.cs | 32 +- .../NsgReference.PowerShell.cs} | 46 +- .../Api202101/NsgReference.TypeConverter.cs | 142 ++ .../api/Models/Api202101/NsgReference.cs | 52 + .../NsgReference.json.cs} | 24 +- .../NsgSecurityRule.PowerShell.cs | 62 +- .../NsgSecurityRule.TypeConverter.cs | 6 +- .../NsgSecurityRule.cs | 6 +- .../NsgSecurityRule.json.cs | 16 +- ...OperationErrorAdditionalInfo.PowerShell.cs | 32 +- ...rationErrorAdditionalInfo.TypeConverter.cs | 6 +- .../OperationErrorAdditionalInfo.cs | 26 +- .../OperationErrorAdditionalInfo.json.cs | 10 +- .../Api202101/OperationStatus.PowerShell.cs | 151 ++ .../OperationStatus.TypeConverter.cs | 6 +- .../OperationStatus.cs | 64 +- .../OperationStatus.json.cs | 30 +- .../OperationStatusError.PowerShell.cs | 38 +- .../OperationStatusError.TypeConverter.cs | 6 +- .../OperationStatusError.cs | 34 +- .../OperationStatusError.json.cs | 40 +- .../OperationsDiscovery.PowerShell.cs | 56 +- .../OperationsDiscovery.TypeConverter.cs | 6 +- .../OperationsDiscovery.cs | 57 +- .../OperationsDiscovery.json.cs | 14 +- ...perationsDiscoveryCollection.PowerShell.cs | 28 +- ...ationsDiscoveryCollection.TypeConverter.cs | 6 +- .../OperationsDiscoveryCollection.cs | 16 +- .../OperationsDiscoveryCollection.json.cs | 12 +- .../PrepareRequest.PowerShell.cs | 34 +- .../PrepareRequest.TypeConverter.cs | 6 +- .../PrepareRequest.cs | 6 +- .../PrepareRequest.json.cs | 16 +- .../ProxyResourceReference.PowerShell.cs | 30 +- .../ProxyResourceReference.TypeConverter.cs | 6 +- .../ProxyResourceReference.cs | 16 +- .../ProxyResourceReference.json.cs | 10 +- ...licIPAddressResourceSettings.PowerShell.cs | 48 +- ...IPAddressResourceSettings.TypeConverter.cs | 6 +- .../PublicIPAddressResourceSettings.cs | 30 +- .../PublicIPAddressResourceSettings.json.cs | 14 +- .../Api202101/PublicIPReference.PowerShell.cs | 131 ++ .../PublicIPReference.TypeConverter.cs | 142 ++ .../api/Models/Api202101/PublicIPReference.cs | 52 + .../Api202101/PublicIPReference.json.cs | 101 ++ ...quiredForResourcesCollection.PowerShell.cs | 133 ++ ...redForResourcesCollection.TypeConverter.cs | 142 ++ .../RequiredForResourcesCollection.cs | 46 + .../RequiredForResourcesCollection.json.cs | 109 ++ ...esourceGroupResourceSettings.PowerShell.cs | 28 +- ...urceGroupResourceSettings.TypeConverter.cs | 6 +- .../ResourceGroupResourceSettings.cs | 18 +- .../ResourceGroupResourceSettings.json.cs | 10 +- .../ResourceMoveRequest.PowerShell.cs | 34 +- .../ResourceMoveRequest.TypeConverter.cs | 6 +- .../ResourceMoveRequest.cs | 6 +- .../ResourceMoveRequest.json.cs | 16 +- .../ResourceSettings.PowerShell.cs | 30 +- .../ResourceSettings.TypeConverter.cs | 6 +- .../ResourceSettings.cs | 6 +- .../ResourceSettings.json.cs | 22 +- .../SqlDatabaseResourceSettings.PowerShell.cs | 32 +- ...lDatabaseResourceSettings.TypeConverter.cs | 6 +- .../SqlDatabaseResourceSettings.cs | 18 +- .../SqlDatabaseResourceSettings.json.cs | 10 +- ...lElasticPoolResourceSettings.PowerShell.cs | 32 +- ...asticPoolResourceSettings.TypeConverter.cs | 6 +- .../SqlElasticPoolResourceSettings.cs | 18 +- .../SqlElasticPoolResourceSettings.json.cs | 10 +- .../SqlServerResourceSettings.PowerShell.cs | 28 +- ...SqlServerResourceSettings.TypeConverter.cs | 6 +- .../SqlServerResourceSettings.cs | 18 +- .../SqlServerResourceSettings.json.cs | 10 +- .../SubnetReference.PowerShell.cs | 30 +- .../SubnetReference.TypeConverter.cs | 6 +- .../SubnetReference.cs | 18 +- .../SubnetReference.json.cs | 10 +- .../SubnetResourceSettings.PowerShell.cs | 137 ++ .../SubnetResourceSettings.TypeConverter.cs | 6 +- .../Api202101/SubnetResourceSettings.cs | 89 ++ .../SubnetResourceSettings.json.cs | 10 +- .../Models/Api202101/Summary.PowerShell.cs | 133 ++ .../Models/Api202101/Summary.TypeConverter.cs | 142 ++ .../generated/api/Models/Api202101/Summary.cs | 63 + .../api/Models/Api202101/Summary.json.cs | 103 ++ .../Api202101/SummaryCollection.PowerShell.cs | 133 ++ .../SummaryCollection.TypeConverter.cs | 142 ++ .../api/Models/Api202101/SummaryCollection.cs | 63 + .../Api202101/SummaryCollection.json.cs | 111 ++ ...nresolvedDependenciesFilter.PowerShell.cs} | 50 +- ...esolvedDependenciesFilter.TypeConverter.cs | 142 ++ .../Api202101/UnresolvedDependenciesFilter.cs | 54 + .../UnresolvedDependenciesFilter.json.cs | 101 ++ ...DependenciesFilterProperties.PowerShell.cs | 132 ++ ...ndenciesFilterProperties.TypeConverter.cs} | 28 +- .../UnresolvedDependenciesFilterProperties.cs | 43 + ...solvedDependenciesFilterProperties.json.cs | 101 ++ .../UnresolvedDependency.PowerShell.cs | 30 +- .../UnresolvedDependency.TypeConverter.cs | 6 +- .../UnresolvedDependency.cs | 6 +- .../UnresolvedDependency.json.cs | 8 +- ...resolvedDependencyCollection.PowerShell.cs | 143 ++ ...olvedDependencyCollection.TypeConverter.cs | 6 +- .../UnresolvedDependencyCollection.cs | 123 ++ .../UnresolvedDependencyCollection.json.cs | 22 +- .../UpdateMoveCollectionRequest.PowerShell.cs | 40 +- ...dateMoveCollectionRequest.TypeConverter.cs | 6 +- .../UpdateMoveCollectionRequest.cs | 38 +- .../UpdateMoveCollectionRequest.json.cs | 12 +- ...ateMoveCollectionRequestTags.PowerShell.cs | 20 +- ...MoveCollectionRequestTags.TypeConverter.cs | 6 +- .../UpdateMoveCollectionRequestTags.cs | 6 +- ...ateMoveCollectionRequestTags.dictionary.cs | 4 +- .../UpdateMoveCollectionRequestTags.json.cs | 8 +- ...rtualMachineResourceSettings.PowerShell.cs | 40 +- ...alMachineResourceSettings.TypeConverter.cs | 6 +- .../VirtualMachineResourceSettings.cs | 18 +- .../VirtualMachineResourceSettings.json.cs | 14 +- ...rtualNetworkResourceSettings.PowerShell.cs | 44 +- ...alNetworkResourceSettings.TypeConverter.cs | 6 +- .../VirtualNetworkResourceSettings.cs | 28 +- .../VirtualNetworkResourceSettings.json.cs | 16 +- .../ResourceMoverIdentity.PowerShell.cs | 12 +- .../api/Models/ResourceMoverIdentity.json.cs | 12 +- .../generated/api/ResourceMover.cs | 1415 ++++++++++++----- .../api/Support/DependencyLevel.Completer.cs | 39 + .../Support/DependencyLevel.TypeConverter.cs | 59 + .../generated/api/Support/DependencyLevel.cs | 97 ++ .../api/Support/DependencyType.Completer.cs | 2 +- .../Support/DependencyType.TypeConverter.cs | 2 +- .../generated/api/Support/DependencyType.cs | 3 +- .../api/Support/JobName.Completer.cs | 2 +- .../api/Support/JobName.TypeConverter.cs | 2 +- .../generated/api/Support/JobName.cs | 3 +- .../MoveResourceInputType.Completer.cs | 2 +- .../MoveResourceInputType.TypeConverter.cs | 2 +- .../api/Support/MoveResourceInputType.cs | 3 +- .../api/Support/MoveState.Completer.cs | 10 +- .../api/Support/MoveState.TypeConverter.cs | 2 +- .../generated/api/Support/MoveState.cs | 7 +- .../Support/ProvisioningState.Completer.cs | 2 +- .../ProvisioningState.TypeConverter.cs | 2 +- .../api/Support/ProvisioningState.cs | 3 +- .../api/Support/ResolutionType.Completer.cs | 2 +- .../Support/ResolutionType.TypeConverter.cs | 2 +- .../generated/api/Support/ResolutionType.cs | 3 +- .../Support/ResourceIdentityType.Completer.cs | 2 +- .../ResourceIdentityType.TypeConverter.cs | 2 +- .../api/Support/ResourceIdentityType.cs | 3 +- .../TargetAvailabilityZone.Completer.cs | 2 +- .../TargetAvailabilityZone.TypeConverter.cs | 2 +- .../api/Support/TargetAvailabilityZone.cs | 3 +- .../api/Support/ZoneRedundant.Completer.cs | 2 +- .../Support/ZoneRedundant.TypeConverter.cs | 2 +- .../generated/api/Support/ZoneRedundant.cs | 3 +- ...esourceMoverMoveResource_CreateExpanded.cs | 82 +- .../GetAzResourceMoverMoveCollection_Get.cs | 24 +- .../GetAzResourceMoverMoveCollection_List.cs | 22 +- .../GetAzResourceMoverMoveCollection_List1.cs | 22 +- .../GetAzResourceMoverMoveResource_Get.cs | 24 +- .../GetAzResourceMoverMoveResource_List.cs | 22 +- ...zResourceMoverRequiredForResources_List.cs | 413 +++++ ...AzResourceMoverUnresolvedDependency_Get.cs | 75 +- ...eAzResourceMoverBulkRemove_BulkExpanded.cs | 512 ++++++ ...okeAzResourceMoverCommit_CommitExpanded.cs | 28 +- ...eAzResourceMoverDiscard_DiscardExpanded.cs | 28 +- ...ourceMoverInitiateMove_InitiateExpanded.cs | 28 +- ...eAzResourceMoverPrepare_PrepareExpanded.cs | 28 +- ...ourceMoverMoveCollection_CreateExpanded.cs | 48 +- ...oveAzResourceMoverMoveCollection_Delete.cs | 24 +- ...emoveAzResourceMoverMoveResource_Delete.cs | 24 +- ...ceMoverMoveCollectionDependency_Resolve.cs | 24 +- .../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 2 +- .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 270 ++-- .../BuildTime/Models/PsHelpMarkdownOutputs.cs | 2 +- .../runtime/BuildTime/Models/PsProxyTypes.cs | 2 +- .../generated/runtime/PipelineMocking.cs | 24 +- .../runtime/UndeclaredResponseException.cs | 7 +- .../help/Add-AzResourceMoverMoveResource.md | 206 +-- src/ResourceMover/help/Az.ResourceMover.md | 8 + .../help/Get-AzResourceMoverMoveCollection.md | 30 +- .../help/Get-AzResourceMoverMoveResource.md | 341 ++-- ...Get-AzResourceMoverRequiredForResources.md | 128 ++ ...Get-AzResourceMoverUnresolvedDependency.md | 69 +- .../help/Invoke-AzResourceMoverBulkRemove.md | 270 ++++ .../help/Invoke-AzResourceMoverCommit.md | 85 +- .../help/Invoke-AzResourceMoverDiscard.md | 78 +- .../Invoke-AzResourceMoverInitiateMove.md | 80 +- .../help/Invoke-AzResourceMoverPrepare.md | 70 +- .../help/New-AzResourceMoverMoveCollection.md | 14 +- .../Remove-AzResourceMoverMoveCollection.md | 32 +- .../Remove-AzResourceMoverMoveResource.md | 32 +- ...AzResourceMoverMoveCollectionDependency.md | 26 +- src/ResourceMover/readme.md | 30 +- ...AzResourceMoverMoveResource.Recording.json | 167 +- .../Add-AzResourceMoverMoveResource.Tests.ps1 | 11 +- ...ResourceMoverMoveCollection.Recording.json | 63 +- ...et-AzResourceMoverMoveCollection.Tests.ps1 | 6 +- ...AzResourceMoverMoveResource.Recording.json | 48 +- .../Get-AzResourceMoverMoveResource.Tests.ps1 | 8 +- ...ceMoverRequiredForResources.Recording.json | 42 + ...esourceMoverRequiredForResources.Tests.ps1 | 19 + ...ceMoverUnresolvedDependency.Recording.json | 26 +- ...esourceMoverUnresolvedDependency.Tests.ps1 | 4 +- ...e-AzResourceMoverBulkRemove.Recording.json | 119 ++ ...Invoke-AzResourceMoverBulkRemove.Tests.ps1 | 19 + ...nvoke-AzResourceMoverCommit.Recording.json | 71 +- .../Invoke-AzResourceMoverCommit.Tests.ps1 | 4 +- ...voke-AzResourceMoverDiscard.Recording.json | 199 ++- .../Invoke-AzResourceMoverDiscard.Tests.ps1 | 4 +- ...AzResourceMoverInitiateMove.Recording.json | 241 ++- ...voke-AzResourceMoverInitiateMove.Tests.ps1 | 4 +- ...voke-AzResourceMoverPrepare.Recording.json | 146 +- .../Invoke-AzResourceMoverPrepare.Tests.ps1 | 8 +- ...ResourceMoverMoveCollection.Recording.json | 26 +- ...ew-AzResourceMoverMoveCollection.Tests.ps1 | 6 +- ...ResourceMoverMoveCollection.Recording.json | 133 +- ...ve-AzResourceMoverMoveCollection.Tests.ps1 | 10 +- ...AzResourceMoverMoveResource.Recording.json | 179 +-- ...move-AzResourceMoverMoveResource.Tests.ps1 | 5 +- ...verMoveCollectionDependency.Recording.json | 73 +- src/ResourceMover/test/env.json | 6 +- src/ResourceMover/test/localEnv.json | 6 +- src/ResourceMover/test/utils.ps1 | 4 +- .../utils/Unprotect-SecureString.ps1 | 16 + 445 files changed, 16466 insertions(+), 7881 deletions(-) create mode 100644 src/ResourceMover/examples/Get-AzResourceMoverRequiredForResources.md create mode 100644 src/ResourceMover/examples/Invoke-AzResourceMoverBulkRemove.md create mode 100644 src/ResourceMover/exports/Get-AzResourceMoverRequiredForResources.ps1 create mode 100644 src/ResourceMover/exports/Invoke-AzResourceMoverBulkRemove.ps1 rename src/ResourceMover/generated/api/Models/{Api20191001Preview/OperationStatusProperties.PowerShell.cs => Any.PowerShell.cs} (75%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview/OperationStatusProperties.TypeConverter.cs => Any.TypeConverter.cs} (84%) create mode 100644 src/ResourceMover/generated/api/Models/Any.cs create mode 100644 src/ResourceMover/generated/api/Models/Any.json.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.PowerShell.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.cs delete mode 100644 src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AffectedMoveResource.PowerShell.cs (67%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AffectedMoveResource.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AffectedMoveResource.cs (80%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AffectedMoveResource.json.cs (92%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AutomaticResolutionProperties.PowerShell.cs (80%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AutomaticResolutionProperties.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AutomaticResolutionProperties.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AutomaticResolutionProperties.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AvailabilitySetResourceSettings.PowerShell.cs (67%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AvailabilitySetResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AvailabilitySetResourceSettings.cs (81%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AvailabilitySetResourceSettings.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AzureResourceReference.PowerShell.cs (80%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AzureResourceReference.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AzureResourceReference.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/AzureResourceReference.json.cs (96%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview/OperationsDiscoveryProperties.TypeConverter.cs => Api202101/BulkRemoveRequest.TypeConverter.cs} (84%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.json.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudError.PowerShell.cs (61%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudError.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudError.cs (74%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudError.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudErrorBody.PowerShell.cs (65%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudErrorBody.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudErrorBody.cs (92%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CloudErrorBody.json.cs (92%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CommitRequest.PowerShell.cs (69%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CommitRequest.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CommitRequest.cs (98%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/CommitRequest.json.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/DiscardRequest.PowerShell.cs (68%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/DiscardRequest.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/DiscardRequest.cs (98%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/DiscardRequest.json.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.PowerShell.cs => Api202101/DiskEncryptionSetResourceSettings.PowerShell.cs} (64%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.TypeConverter.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.cs => Api202101/DiskEncryptionSetResourceSettings.cs} (57%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.json.cs => Api202101/DiskEncryptionSetResourceSettings.json.cs} (81%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Display.PowerShell.cs (72%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Display.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Display.cs (99%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Display.json.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Identity.PowerShell.cs (72%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Identity.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Identity.cs (89%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/Identity.json.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/JobStatus.PowerShell.cs (75%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/JobStatus.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/JobStatus.cs (90%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/JobStatus.json.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview/SubnetResourceSettings.PowerShell.cs => Api202101/KeyVaultResourceSettings.PowerShell.cs} (67%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview/OperationsDiscoveryProperties.json.cs => Api202101/KeyVaultResourceSettings.json.cs} (83%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbBackendAddressPoolResourceSettings.PowerShell.cs (80%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbBackendAddressPoolResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbBackendAddressPoolResourceSettings.cs (92%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbBackendAddressPoolResourceSettings.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbFrontendIpconfigurationResourceSettings.PowerShell.cs (55%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbFrontendIpconfigurationResourceSettings.TypeConverter.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbFrontendIpconfigurationResourceSettings.cs (83%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LbFrontendIpconfigurationResourceSettings.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerBackendAddressPoolReference.PowerShell.cs (75%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerBackendAddressPoolReference.TypeConverter.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerBackendAddressPoolReference.cs (72%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerBackendAddressPoolReference.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerNatRuleReference.PowerShell.cs (75%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerNatRuleReference.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerNatRuleReference.cs (71%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerNatRuleReference.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerResourceSettings.PowerShell.cs (54%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerResourceSettings.cs (77%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/LoadBalancerResourceSettings.json.cs (83%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ManualResolutionProperties.PowerShell.cs (81%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ManualResolutionProperties.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ManualResolutionProperties.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ManualResolutionProperties.json.cs (95%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollection.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollection.TypeConverter.cs (97%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollection.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollection.json.cs (89%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionProperties.TypeConverter.cs (97%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionProperties.json.cs (90%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.PowerShell.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.json.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionResultList.PowerShell.cs (71%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionResultList.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionResultList.cs (85%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionResultList.json.cs (91%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionTags.PowerShell.cs (87%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionTags.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionTags.cs (89%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionTags.dictionary.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveCollectionTags.json.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveErrorInfo.PowerShell.cs (75%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveErrorInfo.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveErrorInfo.cs (73%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveErrorInfo.json.cs (91%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveResource.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResource.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResource.cs (53%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResource.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceCollection.PowerShell.cs (51%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceCollection.TypeConverter.cs (97%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceCollection.json.cs (80%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependency.PowerShell.cs (50%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependency.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependency.cs (81%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependency.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependencyOverride.PowerShell.cs (76%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependencyOverride.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependencyOverride.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceDependencyOverride.json.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceError.PowerShell.cs (59%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceError.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceError.cs (64%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceError.json.cs (93%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceErrorBody.PowerShell.cs (64%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceErrorBody.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceErrorBody.cs (85%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceErrorBody.json.cs (93%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilter.PowerShell.cs (72%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilter.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilter.cs (64%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilter.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilterProperties.PowerShell.cs (79%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilterProperties.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilterProperties.cs (92%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceFilterProperties.json.cs (95%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceProperties.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceProperties.cs (52%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceProperties.json.cs (85%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourcePropertiesErrors.PowerShell.cs (60%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourcePropertiesErrors.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourcePropertiesErrors.cs (59%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourcePropertiesErrors.json.cs (94%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourcePropertiesMoveStatus.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourcePropertiesMoveStatus.cs (50%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourcePropertiesMoveStatus.json.cs (94%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceStatus.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceStatus.cs (62%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/MoveResourceStatus.json.cs (87%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkInterfaceResourceSettings.PowerShell.cs (62%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkInterfaceResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkInterfaceResourceSettings.cs (76%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkInterfaceResourceSettings.json.cs (89%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkSecurityGroupResourceSettings.PowerShell.cs (67%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkSecurityGroupResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkSecurityGroupResourceSettings.cs (72%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NetworkSecurityGroupResourceSettings.json.cs (89%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NicIPConfigurationResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NicIPConfigurationResourceSettings.cs (58%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NicIPConfigurationResourceSettings.json.cs (79%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview/OperationsDiscoveryProperties.PowerShell.cs => Api202101/NsgReference.PowerShell.cs} (72%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/NsgReference.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/NsgReference.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview/OperationStatusProperties.json.cs => Api202101/NsgReference.json.cs} (83%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NsgSecurityRule.PowerShell.cs (54%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NsgSecurityRule.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NsgSecurityRule.cs (99%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/NsgSecurityRule.json.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationErrorAdditionalInfo.PowerShell.cs (64%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationErrorAdditionalInfo.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationErrorAdditionalInfo.cs (66%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationErrorAdditionalInfo.json.cs (95%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/OperationStatus.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationStatus.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationStatus.cs (70%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationStatus.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationStatusError.PowerShell.cs (60%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationStatusError.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationStatusError.cs (75%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationStatusError.json.cs (85%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscovery.PowerShell.cs (55%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscovery.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscovery.cs (87%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscovery.json.cs (90%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscoveryCollection.PowerShell.cs (70%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscoveryCollection.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscoveryCollection.cs (84%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/OperationsDiscoveryCollection.json.cs (91%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PrepareRequest.PowerShell.cs (68%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PrepareRequest.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PrepareRequest.cs (98%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PrepareRequest.json.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ProxyResourceReference.PowerShell.cs (75%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ProxyResourceReference.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ProxyResourceReference.cs (80%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ProxyResourceReference.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PublicIPAddressResourceSettings.PowerShell.cs (59%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PublicIPAddressResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PublicIPAddressResourceSettings.cs (84%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/PublicIPAddressResourceSettings.json.cs (92%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.PowerShell.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.json.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.PowerShell.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.json.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceGroupResourceSettings.PowerShell.cs (76%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceGroupResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceGroupResourceSettings.cs (73%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceGroupResourceSettings.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceMoveRequest.PowerShell.cs (68%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceMoveRequest.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceMoveRequest.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceMoveRequest.json.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceSettings.PowerShell.cs (76%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceSettings.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/ResourceSettings.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlDatabaseResourceSettings.PowerShell.cs (70%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlDatabaseResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlDatabaseResourceSettings.cs (79%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlDatabaseResourceSettings.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlElasticPoolResourceSettings.PowerShell.cs (70%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlElasticPoolResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlElasticPoolResourceSettings.cs (79%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlElasticPoolResourceSettings.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlServerResourceSettings.PowerShell.cs (76%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlServerResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlServerResourceSettings.cs (72%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SqlServerResourceSettings.json.cs (94%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SubnetReference.PowerShell.cs (76%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SubnetReference.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SubnetReference.cs (71%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SubnetReference.json.cs (94%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SubnetResourceSettings.TypeConverter.cs (97%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/SubnetResourceSettings.json.cs (89%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/Summary.PowerShell.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/Summary.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/Summary.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/Summary.json.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.PowerShell.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.json.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview/UnresolvedDependencyCollection.PowerShell.cs => Api202101/UnresolvedDependenciesFilter.PowerShell.cs} (63%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.json.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.TypeConverter.cs => Api202101/UnresolvedDependenciesFilterProperties.TypeConverter.cs} (82%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.cs create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.json.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UnresolvedDependency.PowerShell.cs (76%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UnresolvedDependency.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UnresolvedDependency.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UnresolvedDependency.json.cs (96%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.PowerShell.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UnresolvedDependencyCollection.TypeConverter.cs (97%) create mode 100644 src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.cs rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UnresolvedDependencyCollection.json.cs (78%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequest.PowerShell.cs (59%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequest.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequest.cs (67%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequest.json.cs (93%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequestTags.PowerShell.cs (86%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequestTags.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequestTags.cs (88%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequestTags.dictionary.cs (96%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/UpdateMoveCollectionRequestTags.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualMachineResourceSettings.PowerShell.cs (62%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualMachineResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualMachineResourceSettings.cs (86%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualMachineResourceSettings.json.cs (95%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualNetworkResourceSettings.PowerShell.cs (57%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualNetworkResourceSettings.TypeConverter.cs (97%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualNetworkResourceSettings.cs (84%) rename src/ResourceMover/generated/api/Models/{Api20191001Preview => Api202101}/VirtualNetworkResourceSettings.json.cs (92%) create mode 100644 src/ResourceMover/generated/api/Support/DependencyLevel.Completer.cs create mode 100644 src/ResourceMover/generated/api/Support/DependencyLevel.TypeConverter.cs create mode 100644 src/ResourceMover/generated/api/Support/DependencyLevel.cs create mode 100644 src/ResourceMover/generated/cmdlets/GetAzResourceMoverRequiredForResources_List.cs create mode 100644 src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverBulkRemove_BulkExpanded.cs create mode 100644 src/ResourceMover/help/Get-AzResourceMoverRequiredForResources.md create mode 100644 src/ResourceMover/help/Invoke-AzResourceMoverBulkRemove.md create mode 100644 src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Recording.json create mode 100644 src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Tests.ps1 create mode 100644 src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Recording.json create mode 100644 src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Tests.ps1 create mode 100644 src/ResourceMover/utils/Unprotect-SecureString.ps1 diff --git a/src/ResourceMover/Az.ResourceMover.format.ps1xml b/src/ResourceMover/Az.ResourceMover.format.ps1xml index 1197c8d0c51a..2042ba1424f5 100644 --- a/src/ResourceMover/Az.ResourceMover.format.ps1xml +++ b/src/ResourceMover/Az.ResourceMover.format.ps1xml @@ -42,9 +42,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResource + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResource - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResource + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResource @@ -64,9 +64,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AutomaticResolutionProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AutomaticResolutionProperties - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AutomaticResolutionProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AutomaticResolutionProperties @@ -86,9 +86,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AvailabilitySetResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AvailabilitySetResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AvailabilitySetResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AvailabilitySetResourceSettings @@ -126,9 +126,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AzureResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AzureResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference @@ -148,9 +148,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBody + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.BulkRemoveRequest - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBody + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.BulkRemoveRequest + + + + + + + + + + + + + + + + + + MoveResource + + + MoveResourceInputType + + + ValidateOnly + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBody + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBody @@ -182,9 +216,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CommitRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CommitRequest - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CommitRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CommitRequest @@ -216,9 +250,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.DiscardRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.DiscardRequest - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.DiscardRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.DiscardRequest @@ -250,9 +284,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Display + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.DiskEncryptionSetResourceSettings + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.DiskEncryptionSetResourceSettings + + + + + + + + + + + + + + + ResourceType + + + TargetResourceName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Display - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Display + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Display @@ -290,9 +352,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity @@ -324,9 +386,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatus @@ -352,9 +414,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbBackendAddressPoolResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.KeyVaultResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbBackendAddressPoolResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.KeyVaultResourceSettings + + + + + + + + + + + + + + + ResourceType + + + TargetResourceName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbBackendAddressPoolResourceSettings + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbBackendAddressPoolResourceSettings @@ -374,9 +464,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbFrontendIpconfigurationResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbFrontendIpconfigurationResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbFrontendIpconfigurationResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbFrontendIpconfigurationResourceSettings @@ -414,9 +504,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerBackendAddressPoolReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LoadBalancerBackendAddressPoolReference - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerBackendAddressPoolReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LoadBalancerBackendAddressPoolReference @@ -442,9 +532,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerNatRuleReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LoadBalancerNatRuleReference - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerNatRuleReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LoadBalancerNatRuleReference @@ -470,9 +560,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LoadBalancerResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LoadBalancerResourceSettings @@ -510,9 +600,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ManualResolutionProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ManualResolutionProperties - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ManualResolutionProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ManualResolutionProperties @@ -532,12 +622,15 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection + + + @@ -551,6 +644,9 @@ + + Etag + Location @@ -566,9 +662,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionProperties - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionProperties @@ -600,9 +696,43 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionResultList + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionPropertiesErrors - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionResultList + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionPropertiesErrors + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionResultList + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionResultList @@ -622,9 +752,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTags + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTags - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTags + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTags @@ -644,15 +774,18 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceCollection - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceCollection + + + @@ -660,15 +793,18 @@ NextLink + + TotalCount + - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependency + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependency - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependency + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependency @@ -706,9 +842,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyOverride + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyOverride - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyOverride + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyOverride @@ -728,9 +864,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBody + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBody - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBody + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBody @@ -762,9 +898,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceFilterProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceFilterProperties - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceFilterProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceFilterProperties @@ -784,15 +920,18 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceProperties - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceProperties + + + @@ -809,6 +948,9 @@ ExistingTargetId + + IsResolveRequired + ProvisioningState @@ -824,9 +966,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrors + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourcePropertiesErrors - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrors + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourcePropertiesErrors @@ -858,9 +1000,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourcePropertiesMoveStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourcePropertiesMoveStatus @@ -882,9 +1024,6 @@ - - - @@ -907,55 +1046,21 @@ Target - - TargetId - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettings - - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettings - - - - - - - - - - - - - - - ResourceType - - - TargetResourceName - - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatus - - - @@ -963,18 +1068,15 @@ MoveState - - TargetId - - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NetworkInterfaceResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NetworkInterfaceResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings @@ -1006,9 +1108,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NetworkSecurityGroupResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NetworkSecurityGroupResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings @@ -1034,9 +1136,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NicIPConfigurationResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NicIPConfigurationResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NicIPConfigurationResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NicIPConfigurationResourceSettings @@ -1074,9 +1176,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NsgSecurityRule + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgReference + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgReference + + + + + + + + + + + + SourceArmResourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgSecurityRule - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NsgSecurityRule + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgSecurityRule @@ -1150,9 +1274,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationErrorAdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationErrorAdditionalInfo @@ -1172,12 +1296,15 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscovery + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscovery - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscovery + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscovery + + + @@ -1188,6 +1315,9 @@ + + IsDataAction + Name @@ -1200,9 +1330,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscoveryCollection - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscoveryCollection @@ -1222,9 +1352,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusError + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusError - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusError + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusError @@ -1250,9 +1380,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.PrepareRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.PrepareRequest - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.PrepareRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.PrepareRequest @@ -1284,9 +1414,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference @@ -1312,9 +1442,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.PublicIPAddressResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.PublicIPAddressResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.PublicIPAddressResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.PublicIPAddressResourceSettings @@ -1328,7 +1458,7 @@ - + @@ -1353,7 +1483,7 @@ DomainNameLabel - FQdn + Fqdn PublicIPAllocationMethod @@ -1370,9 +1500,53 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceGroupResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.PublicIPReference - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceGroupResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.PublicIPReference + + + + + + + + + + + + SourceArmResourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.RequiredForResourcesCollection + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.RequiredForResourcesCollection + + + + + + + + + + + + SourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceGroupResourceSettings + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceGroupResourceSettings @@ -1398,9 +1572,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceMoveRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceMoveRequest - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceMoveRequest + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceMoveRequest @@ -1432,9 +1606,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings @@ -1460,9 +1634,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SqlDatabaseResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SqlDatabaseResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SqlDatabaseResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SqlDatabaseResourceSettings @@ -1494,9 +1668,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SqlElasticPoolResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SqlElasticPoolResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SqlElasticPoolResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SqlElasticPoolResourceSettings @@ -1528,9 +1702,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SqlServerResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SqlServerResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SqlServerResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SqlServerResourceSettings @@ -1556,9 +1730,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetReference - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetReference @@ -1584,9 +1758,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetResourceSettings @@ -1612,15 +1786,90 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UnresolvedDependencyCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Summary - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UnresolvedDependencyCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Summary + + + + + + + + + + + + + + + Count + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection + + + + + + + + + + + + FieldName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependenciesFilterProperties + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependenciesFilterProperties + + + + + + + + + + + + Count + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependencyCollection + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependencyCollection + + + @@ -1628,15 +1877,18 @@ NextLink + + TotalCount + - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTags + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UpdateMoveCollectionRequestTags - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTags + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UpdateMoveCollectionRequestTags @@ -1656,9 +1908,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.VirtualMachineResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.VirtualMachineResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings @@ -1702,9 +1954,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.VirtualNetworkResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.VirtualNetworkResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings diff --git a/src/ResourceMover/Az.ResourceMover.psd1 b/src/ResourceMover/Az.ResourceMover.psd1 index fad7b2ecf2a0..d8649ae0dcae 100644 --- a/src/ResourceMover/Az.ResourceMover.psd1 +++ b/src/ResourceMover/Az.ResourceMover.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 9/15/2020 +# Generated on: 2/24/2021 # @{ @@ -45,7 +45,7 @@ PowerShellVersion = '5.1' DotNetFrameworkVersion = '4.7.2' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# CLRVersion = '' +# ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' @@ -72,8 +72,10 @@ FormatsToProcess = './Az.ResourceMover.format.ps1xml' FunctionsToExport = 'Add-AzResourceMoverMoveResource', 'Get-AzResourceMoverMoveCollection', 'Get-AzResourceMoverMoveResource', + 'Get-AzResourceMoverRequiredForResources', 'Get-AzResourceMoverUnresolvedDependency', - 'Invoke-AzResourceMoverCommit', 'Invoke-AzResourceMoverDiscard', + 'Invoke-AzResourceMoverBulkRemove', 'Invoke-AzResourceMoverCommit', + 'Invoke-AzResourceMoverDiscard', 'Invoke-AzResourceMoverInitiateMove', 'Invoke-AzResourceMoverPrepare', 'New-AzResourceMoverMoveCollection', @@ -88,7 +90,7 @@ CmdletsToExport = @() # VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = '*' +AliasesToExport = 'Update-AzResourceMoverMoveResource', '*' # DSC resources to export from this module # DscResourcesToExport = @() @@ -117,7 +119,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* First preview release for module Az.ResourceMover' + # ReleaseNotes = '' # Prerelease string of this module # Prerelease = '' diff --git a/src/ResourceMover/Az.ResourceMover.psm1 b/src/ResourceMover/Az.ResourceMover.psm1 index 4aee0d4cb7f8..5315cb4fc724 100644 --- a/src/ResourceMover/Az.ResourceMover.psm1 +++ b/src/ResourceMover/Az.ResourceMover.psm1 @@ -24,17 +24,17 @@ } } if(-not $accountsModule) { - $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0 + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0 if($hasAdequateVersion) { - $accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru } } } if(-not $accountsModule) { - Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop - } elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) { - Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } Write-Information "Loaded Module '$($accountsModule.Name)'" diff --git a/src/ResourceMover/Changelog.md b/src/ResourceMover/Changelog.md index 6a3a7c0c9d4e..037a48eaa220 100644 --- a/src/ResourceMover/Changelog.md +++ b/src/ResourceMover/Changelog.md @@ -18,6 +18,9 @@ - Additional information about change #1 --> ## Upcoming Release +* Added new cmdlets `Invoke-AzResourceMoverBulkRemove`, `Get-AzResourceMoverRequiredForResources` +* Added alias to `Add-AzResourceMoverMoveResource`: `Update-AzResourceMoverMoveResource` +* Flattened object "ResourceSettings" ## Version 0.1.0 * First preview release for module Az.ResourceMover diff --git a/src/ResourceMover/build-module.ps1 b/src/ResourceMover/build-module.ps1 index 7a4554d117b6..b3b1cd2332c5 100644 --- a/src/ResourceMover/build-module.ps1 +++ b/src/ResourceMover/build-module.ps1 @@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder if($NoDocs) { Write-Host -ForegroundColor Green 'Creating exports...' - Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder } else { Write-Host -ForegroundColor Green 'Creating exports and docs...' $moduleDescription = 'Microsoft Azure PowerShell: ResourceMover cmdlets' diff --git a/src/ResourceMover/check-dependencies.ps1 b/src/ResourceMover/check-dependencies.ps1 index 513c52ca2fb5..7ada900d8f0e 100644 --- a/src/ResourceMover/check-dependencies.ps1 +++ b/src/ResourceMover/check-dependencies.ps1 @@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) { $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" } -DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1' +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3' DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' $tools = Join-Path $PSScriptRoot 'tools' @@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) { Write-Host -ForegroundColor Green "Building local Resource module used for test..." Set-Location $resourceDir - $null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources + $null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/ Set-Location $HOME/.PSSharedModules/Resources $null = .\build-module.ps1 diff --git a/src/ResourceMover/custom/readme.md b/src/ResourceMover/custom/readme.md index 73c8f53134a2..29e1bb2cbabf 100644 --- a/src/ResourceMover/custom/readme.md +++ b/src/ResourceMover/custom/readme.md @@ -31,11 +31,11 @@ These provide functionality to our HTTP pipeline and other useful features. In s ### Attributes For processing the cmdlets, we've created some additional attributes: -- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.DescriptionAttribute` +- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.DescriptionAttribute` - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. -- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.DoNotExportAttribute` +- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.DoNotExportAttribute` - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ResourceMover`. -- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.InternalExportAttribute` +- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.InternalExportAttribute` - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.ResourceMover`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder. -- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.ProfileAttribute` +- `Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ProfileAttribute` - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/ResourceMover/examples/Add-AzResourceMoverMoveResource.md b/src/ResourceMover/examples/Add-AzResourceMoverMoveResource.md index 346821d6288c..cfaf2ecf8339 100644 --- a/src/ResourceMover/examples/Add-AzResourceMoverMoveResource.md +++ b/src/ResourceMover/examples/Add-AzResourceMoverMoveResource.md @@ -1,41 +1,105 @@ -### Example 1: Adding a resource to the move collection. +### Example 1: Add a resource to the Move Collection. ```powershell -PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name PSDemoVM -ResourceSettingResourceType "Microsoft.Compute/virtualMachines" -ResourceSettingTargetResourceName PSDemoVM - -Output: - -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migr - ate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : DependencyComputationPending -MoveStatusDetail : {} -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resou - rceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. - Possible Causes: Dependency computation is pending for resource. - Recommended Action: Validate dependencies to compute the dependencies. - -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachi - nes/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $targetResourceSettingsObj + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : DependencyComputationPending +MoveStatusErrorsPropertiesDetail : {} +MoveStatusErrorsPropertiesMessage : The dependency computation is not completed for resource - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. Possible Causes: Dependency computation is pending for resource. Recommended Action: Validate dependencies to compute the dependencies. +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $targetResourceSettingsObj = New-Object Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +PS C:\> $targetResourceSettingsObj.ResourceType = "Microsoft.Compute/virtualMachines" +$targetResourceSettingsObj.TargetResourceName = "PSDemoVM" + +``` + +Add a resource to the Move Collection. + +### Example 2: Add a resource to the Move Collection that has existing target resource. +```powershell +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm" -Name "psdemorm" -ExistingTargetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target" + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : CommitPending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : +Type : + +``` + +Add a resource to the Move Collection that has existing target resource. + +### Example 3: Update target resource settings after the Move Resource has been added. +```powershell +PS C:\> Update-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $TargetResourceSettingObj + + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : True +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $moveResourceObj = Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" +PS C:\> $TargetResourceSettingObj = $moveResourceObj.ResourceSetting +$TargetResourceSettingObj.TargetResourceName="PSDemoVM-target" ``` -Adding a resource to the move collection within the specified subscription. \ No newline at end of file +Update target resource settings after the Move Resource has been added. \ No newline at end of file diff --git a/src/ResourceMover/examples/Get-AzResourceMoverMoveCollection.md b/src/ResourceMover/examples/Get-AzResourceMoverMoveCollection.md index 7527742810ef..4c550d43de8b 100644 --- a/src/ResourceMover/examples/Get-AzResourceMoverMoveCollection.md +++ b/src/ResourceMover/examples/Get-AzResourceMoverMoveCollection.md @@ -1,12 +1,12 @@ ### Example 1: Get details of all the Move collections in the subscription ```powershell -PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId e80eb9fa-c996-4435-aa32-5af6f3d3077c +PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Location Name Type --------- ---- ---- -eastus2 mvcolle2e07001 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e34745 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e56720 Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"270119e0-0000-0c00-0000-5f5c94940000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"39015ed4-0000-0c00-0000-5f5ce2760000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections +"1000b505-0000-0c00-0000-5f69db6e0000" centraluseuap MoveCollection-cus-eus-ccy Microsoft.Migrate/moveCollections ``` @@ -15,25 +15,27 @@ Get details of all the Move collections in the subscription. ### Example 2: Get details of the Move collection with a specified move collection name in the subscription ```powershell -PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM -Name PS-centralus-westcentralus-demoRM +PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PS-centralus-westcentralus-demoRMS" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections ``` Get details of the Move collection with a specified move collection name in the subscription. ### Example 3: Get details of the Move collection with a specified resource group name in the subscription ```powershell -PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM +PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" Location Name Type -------- ---- ---- eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections -eastus2euap PS-centralus-westcentralus-demoRM2 Microsoft.Migrate/moveCollections - +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"4e02b0a9-0000-0c00-0000-5fd101cc0000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections ``` -Get details of the Move Collection with a specified resource group name in the subscription. +Get details of the Move Collection with a specified resource group name in the subscription. \ No newline at end of file diff --git a/src/ResourceMover/examples/Get-AzResourceMoverMoveResource.md b/src/ResourceMover/examples/Get-AzResourceMoverMoveResource.md index a1ba0b762081..f20cef482b71 100644 --- a/src/ResourceMover/examples/Get-AzResourceMoverMoveResource.md +++ b/src/ResourceMover/examples/Get-AzResourceMoverMoveResource.md @@ -1,95 +1,137 @@ ### Example 1: Get details of all the resources in the Move collection. ```powershell -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM +PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.networ - k/publicipaddresses/psdemovm-ip, /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psd - emorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet, /subscriptions/e80eb9fa-c996-4435-aa32 - -5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemovm62 -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : MovePending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemovm62 -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Network/networkInterfaces -ResourceSettingTargetResourceName : psdemovm62 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network - /networkInterfaces/psdemovm62 -SourceResourceSettingResourceType : Microsoft.Network/networkInterfaces -SourceResourceSettingTargetResourceName : psdemovm62 -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemorm -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : CommitPending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemorm -ProvisioningState : Succeeded -ResourceSettingResourceType : resourceGroups -ResourceSettingTargetResourceName : psdemorm2 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm -SourceResourceSettingResourceType : resourceGroups -SourceResourceSettingTargetResourceName : psdemorm -Target : -TargetId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psdemorm2 -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm-vnet +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemorm-vnet +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-v + net +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm-nsg +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm-nsg +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psde + movm-nsg +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +TargetId : +Type : + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : DeleteSourcePending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Type : ``` @@ -97,37 +139,33 @@ Get details of all the resources in the move collection. ### Example 2: Get details of a specific resources in a Move collection using move resource name . ```powershell -PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Name PSDemoVM +PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : ``` @@ -135,37 +173,36 @@ Get details of a specific resources in a Move collection using move resource nam ### Example 3:Get details of a specific resources in a Move collection using filters such as : SourceResourceName, SourceId, MoveState, IsResolveRequired, ProvisioningState ```powershell -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Filter "Properties/SourceResourceName eq 'PSDemoVM'" +PS C:\WINDOWS\system32> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Filter "Properties/SourceResourceName eq 'psdemovm111'" + -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : ``` diff --git a/src/ResourceMover/examples/Get-AzResourceMoverRequiredForResources.md b/src/ResourceMover/examples/Get-AzResourceMoverRequiredForResources.md new file mode 100644 index 000000000000..ecda9da573be --- /dev/null +++ b/src/ResourceMover/examples/Get-AzResourceMoverRequiredForResources.md @@ -0,0 +1,11 @@ +### Example 1: Get a list of required resource ARMIDs that are required to be added, to add the specified resource. +```powershell +PS C:\> Get-AzResourceMoverRequiredForResources -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups" + +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg +``` + +Get a list of required resource ARMIDs that are required to be added, to add the specified resource. diff --git a/src/ResourceMover/examples/Get-AzResourceMoverUnresolvedDependency.md b/src/ResourceMover/examples/Get-AzResourceMoverUnresolvedDependency.md index 077e1873ba35..b802444f32bb 100644 --- a/src/ResourceMover/examples/Get-AzResourceMoverUnresolvedDependency.md +++ b/src/ResourceMover/examples/Get-AzResourceMoverUnresolvedDependency.md @@ -1,11 +1,12 @@ -### Example 1: Get list of unresolved dependent resources +### Example 1: Get list of unresolved dependent resources for a Move Collection. ```powershell -PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Count Id ------ -- -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/publicipaddresses/psdemovm-ip -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/virtualnetworks/psdemorm-vnet -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg +PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -DependencyLevel Descendant +Count Id +----- -- + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + 3 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm ``` -Get list of unresolved dependent resources for a Move collection. \ No newline at end of file +Get a list of unresolved dependent resources for a Move Collection. \ No newline at end of file diff --git a/src/ResourceMover/examples/Invoke-AzResourceMoverBulkRemove.md b/src/ResourceMover/examples/Invoke-AzResourceMoverBulkRemove.md new file mode 100644 index 000000000000..0841ae7bd5b8 --- /dev/null +++ b/src/ResourceMover/examples/Invoke-AzResourceMoverBulkRemove.md @@ -0,0 +1,57 @@ +### Example 1: Validate the dependecies before remove of the Move Resources from Move Collection +```powershell +PS C:\> Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:52:28 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Message : +Name : b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:52:28 PM +Status : Succeeded + +``` + +Validate the dependecies before remove of the move resources from Move Collection. + +### Example 2: Remove the Move Resource from Move Collection using "MoveResource Name" as input +```powershell +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:58:10 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d4827071-b797-45c5-b88c-00ddd7818d42 +Message : +Name : d4827071-b797-45c5-b88c-00ddd7818d42 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:57:08 PM +Status : Succeeded +``` + +Remove the Move Resource from Move Collection using "MoveResource Name" as input + +### Example 3: Remove the Move Resource from Move Collection using "SourceARMID" as input +```powershell +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:05:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/7b6904e2-fc3f-400d-b248-8908fcb282fb +Message : +Name : 7b6904e2-fc3f-400d-b248-8908fcb282fb +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:05:00 PM +Status : Succeeded +``` + +Remove the Move Resource from Move Collection using "SourceARMID" as input \ No newline at end of file diff --git a/src/ResourceMover/examples/Invoke-AzResourceMoverCommit.md b/src/ResourceMover/examples/Invoke-AzResourceMoverCommit.md index e1a90f5778ea..acf187b8f9c1 100644 --- a/src/ResourceMover/examples/Invoke-AzResourceMoverCommit.md +++ b/src/ResourceMover/examples/Invoke-AzResourceMoverCommit.md @@ -1,62 +1,61 @@ -### Example 1: Validate the dependecies before commit of the resources +### Example 1: Validate the dependecies before commit of the resources. ```powershell -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') -ValidateOnly - - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:38:26 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/c194298b-b2eb-4aab-80b4-129d1473b75c +Message : +Name : c194298b-b2eb-4aab-80b4-129d1473b75c +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:38:25 PM Status : Succeeded ``` Validate the dependecies before commit of the resources. -### Example 2: Commit the set of resources in the Move Collection using "MoveResource Name" as input +### Example 2: Commit the set of resources in the Move Collection using "MoveResource Name" as input. ```powershell -PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:41:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/80c04850-7f3f-4e9c-aa68-b868978b59f3 +Message : +Name : 80c04850-7f3f-4e9c-aa68-b868978b59f3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:41:05 PM Status : Succeeded ``` -Commit the set of resources in the Move Collection using "MoveResource Name" as input +Commit the set of resources in the Move Collection using "MoveResource Name" as input. -### Example 3: Commit the set of resources in the Move Collection using "SourceARMID" as input +### Example 3: Commit the set of resources in the Move Collection using "SourceARMID" as input. ```powershell -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:19:29 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Message : -Name : aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:19:28 AM +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:42:46 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d36ca519-8ced-48c9-a968-cb5e9c4db731 +Message : +Name : d36ca519-8ced-48c9-a968-cb5e9c4db731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:42:41 PM Status : Succeeded ``` -Commit the set of resources in the Move Collection using "SourceARMID" as input +Commit the set of resources in the Move Collection using "SourceARMID" as input. diff --git a/src/ResourceMover/examples/Invoke-AzResourceMoverDiscard.md b/src/ResourceMover/examples/Invoke-AzResourceMoverDiscard.md index cd6fa17acaac..04ade64a38e3 100644 --- a/src/ResourceMover/examples/Invoke-AzResourceMoverDiscard.md +++ b/src/ResourceMover/examples/Invoke-AzResourceMoverDiscard.md @@ -1,17 +1,17 @@ ### Example 1: Validate the dependecies before Discard of the resources. ```powershell -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 9:44:54 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/62861ceb-28c9-4e0c-811b-84692a203181 -Message : -Name : 62861ceb-28c9-4e0c-811b-84692a203181 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 9:44:54 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:39:48 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:39:37 PM Status : Succeeded ``` @@ -19,40 +19,40 @@ Status : Succeeded Validate the dependecies before Discard of the resources. -### Example 2: Discards the move of the resources using "MoveResource Name" as input +### Example 2: Discards the move of the resources using "MoveResource Name" as input. ```powershell -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:26:51 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Message : -Name : 21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:26:39 AM +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:56:33 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:55:21 PM Status : Succeeded ``` Discards the move of the resources using "MoveResource Name" as input. -### Example 3: Discards the move of the resources using "SourceARMID" as input +### Example 3: Discards the move of the resources using "SourceARMID" as input. ```powershell -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:33:37 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/b842efcd-e5fd-42b0-a277-01ee8225deed -Message : -Name : b842efcd-e5fd-42b0-a277-01ee8225deed -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:33:23 AM +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:01:32 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:00:00 PM Status : Succeeded diff --git a/src/ResourceMover/examples/Invoke-AzResourceMoverInitiateMove.md b/src/ResourceMover/examples/Invoke-AzResourceMoverInitiateMove.md index 90be0a87c2d1..5f829e789ca4 100644 --- a/src/ResourceMover/examples/Invoke-AzResourceMoverInitiateMove.md +++ b/src/ResourceMover/examples/Invoke-AzResourceMoverInitiateMove.md @@ -1,18 +1,18 @@ ### Example 1: Validate the dependecies before Initiate Move for the resources. ```powershell -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly - - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:07:36 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Message : -Name : 8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:07:35 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 9:39:37 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 9:39:37 AM Status : Succeeded ``` @@ -20,40 +20,40 @@ Status : Succeeded Validate the dependecies before Initiate Move for the resources. -### Example 2: Initiate Move for the set of resources in the Move collection using "MoveResource Name" as input +### Example 2: Initiate Move for the set of resources in the Move collection using "MoveResource Name" as input. ```powershell -PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:24:21 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/bc30d933-c2b6-47c9-b583-240d375b5864 -Message : -Name : bc30d933-c2b6-47c9-b583-240d375b5864 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:24:21 AM +PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 11:56:33 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 11:55:21 AM Status : Succeeded ``` Initiate Move for the set of resources in the Move collection using "MoveResource Name" as input. -### Example 3: Initiate Move for the set of resources in the Move Collection using "SourceARMID" as input +### Example 3: Initiate Move for the set of resources in the Move Collection using "SourceARMID" as input. ```powershell -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:38:33 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/cbc0f921-de9b-45d5-91da-60e36b841b10 -Message : -Name : cbc0f921-de9b-45d5-91da-60e36b841b10 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:37:23 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:01:35 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:00:21 PM Status : Succeeded ``` diff --git a/src/ResourceMover/examples/Invoke-AzResourceMoverPrepare.md b/src/ResourceMover/examples/Invoke-AzResourceMoverPrepare.md index 7a353b9c9e4c..fdcd586439b7 100644 --- a/src/ResourceMover/examples/Invoke-AzResourceMoverPrepare.md +++ b/src/ResourceMover/examples/Invoke-AzResourceMoverPrepare.md @@ -1,59 +1,70 @@ -### Example 1: Validate the dependecies before prepare for the resources +### Example 1: Validate the dependecies before prepare of the resources. Get the required dependent resources that also need to be prepared. ```powershell -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm') -ValidateOnly +PS C:\> $resp = Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemovm') -ValidateOnly AdditionalInfo : {Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfo} Code : MoveCollectionMissingRequiredDependentResources Detail : {} -EndTime : 8/21/2020 6:04:15 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr - ate/MoveCollections/MoveCollection-cus-wcus-eus2/operations/12d055bd-ac52-427f-8b05-b4b21c4b51e8 +EndTime : 2/9/2021 9:04:15 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr + ate/MoveCollections/PS-centralus-westcentralus-demoRMS/12d055bd-ac52-427f-8b05-b4b21c4b51e8 Message : The operation has failed as required move resources are missing from the input. Possible Causes: Dependent resources are missing from the input. Recommended Action: Retry the operation with all required resources, if the issue persist contact support. Name : 12d055bd-ac52-427f-8b05-b4b21c4b51e8 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:04:14 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 9:04:14 AM Status : Failed +PS C:> $resp.Code +MoveCollectionMissingRequiredDependentResources + +PS C:> $resp.AdditionalInfo[0].InfoMoveResource + +SourceId +-------- +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + ``` -Validate the dependecies before prepare for the resources. +Validate the dependecies before prepare of the resources. Get the required dependent resources that also need to be prepared. -### Example 2: Initiate prepare for the set of resources in the Move Collection using "MoveResource Name" as input +### Example 2: Initiate prepare for the set of resources in the Move Collection using "MoveResource Name" as input. ```powershell -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm','psdemovm62', 'PSDemoVM-ip', 'PSDemoRM-vnet','PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM','psdemovm111', 'PSDemoRM-vnet','PSDemoVM-nsg') -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:18:09 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Message : -Name : da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:18:08 AM +AAdditionalInfo : +Code : +Detail : +EndTime : 2/9/2021 11:25:13 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/49e4429 + 4-24ac-4eac-93da-e7e1c815554d +Message : +Name : 49e44294-24ac-4eac-93da-e7e1c815554d +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 10:55:53 AM Status : Succeeded ``` Initiate prepare for the set of resources in the Move Collection using "MoveResource Name" as input. -### Example 3: Initiate prepare for the set of resources in the Move Collection using "SourceARMID" +### Example 3: Initiate prepare for the set of resources in the Move Collection using "SourceARMID". ```powershell -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRMS/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') AdditionalInfo : Code : Detail : -EndTime : 8/21/2020 5:35:30 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 +EndTime : 2/9/2021 11:09:30 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/MoveColl + ections/PS-centralus-westcentralus-demoRMS/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 Message : Name : c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:35:27 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 11:05:27 AM Status : Succeeded ``` diff --git a/src/ResourceMover/examples/New-AzResourceMoverMoveCollection.md b/src/ResourceMover/examples/New-AzResourceMoverMoveCollection.md index 5aba651fecf4..8eea4b96c8d1 100644 --- a/src/ResourceMover/examples/New-AzResourceMoverMoveCollection.md +++ b/src/ResourceMover/examples/New-AzResourceMoverMoveCollection.md @@ -1,10 +1,10 @@ ### Example 1: Create a new Move collection. ```powershell -PS C:\> New-AzResourceMoverMoveCollection -Name PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -SourceRegion centralus -TargetRegion westcentralus -Location eastus2 +PS C:\> New-AzResourceMoverMoveCollection -Name "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceRegion "centralus" -TargetRegion "westcentralus" -Location "centraluseuap" -IdentityType "SystemAssigned" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"0200d92f-0000-3300-0000-6021e9ec0000" centraluseuap PS-centralus-westcentralus-demoRMs Microsoft.Migrate/moveCollections ``` -Create a new Move collection within a subscription. \ No newline at end of file +Create a new Move Collection. \ No newline at end of file diff --git a/src/ResourceMover/examples/Remove-AzResourceMoverMoveCollection.md b/src/ResourceMover/examples/Remove-AzResourceMoverMoveCollection.md index df521f8d1f9b..58eef99d7248 100644 --- a/src/ResourceMover/examples/Remove-AzResourceMoverMoveCollection.md +++ b/src/ResourceMover/examples/Remove-AzResourceMoverMoveCollection.md @@ -1,18 +1,18 @@ -### Example 1: Remove the Move Collection from the specified subscription +### Example 1: Remove the Move Collection. ```powershell -PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" +PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" - AdditionalInfo : - Code : - Detail : - EndTime : 8/12/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866d6 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/12/2020 3:27:27 PM - Status : Succeeded +AdditionalInfo : +Code : +Detail : +EndTime : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/ec788761-2f1b-46a2-97b7-f5056afd334d +Message : +Name : +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : +Status : Succeeded ``` -Remove the Move collection from the specified subscription. \ No newline at end of file +Remove the Move Collection. \ No newline at end of file diff --git a/src/ResourceMover/examples/Remove-AzResourceMoverMoveResource.md b/src/ResourceMover/examples/Remove-AzResourceMoverMoveResource.md index 5b7406ddb4ca..ee3a402d6779 100644 --- a/src/ResourceMover/examples/Remove-AzResourceMoverMoveResource.md +++ b/src/ResourceMover/examples/Remove-AzResourceMoverMoveResource.md @@ -1,19 +1,19 @@ -### Example 1: Remove the resource from the Move collection +### Example 1: Remove one Move Rresource from the Move Collection. ```powershell -PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -Name "psdemorm" +PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -Name "psdemorm-vnet" - AdditionalInfo : - Code : - Detail : - EndTime : 8/11/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866c5 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/11/2020 3:27:27 PM - Status : Succeeded +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:08:49 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Message : +Name : bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:08:47 PM +Status : Succeeded ``` - Remove the resource from the Move collection within the specified subscription. \ No newline at end of file + Remove one Move Rresource from the Move Collection. \ No newline at end of file diff --git a/src/ResourceMover/examples/Resolve-AzResourceMoverMoveCollectionDependency.md b/src/ResourceMover/examples/Resolve-AzResourceMoverMoveCollectionDependency.md index 5a938fed0629..5250bb57f138 100644 --- a/src/ResourceMover/examples/Resolve-AzResourceMoverMoveCollectionDependency.md +++ b/src/ResourceMover/examples/Resolve-AzResourceMoverMoveCollectionDependency.md @@ -1,21 +1,21 @@ -### Example 1: Computes, resolves and validate the dependencies of the moveresources in the Move collection. +### Example 1: Compute, resolve and validate the dependencies of the Move Resources in the Move collection. ```powershell -PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" +PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" AdditionalInfo : Code : MoveCollectionResolveDependenciesOperationFailed Detail : {} -EndTime : 8/16/2020 2:28:18 PM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveCollections/PS-ce - ntralus-westcentralus-demoRM/operations/bce85a10-1ff3-4815-a677-7b188f7b441a -Message : The resolve dependencies operation of one ore more resources has failed. Check the move status of the resource for more details. -Possible Causes: The resolve dependencies operation of one ore more resources has failed. -Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. +EndTime : 2/9/2021 2:05:04 AM +Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/c2ad006 + 6-6a69-45fe-aa70-193c240a9bc0 +Message : The resolve dependencies operation of one or more resources has failed. Check the move status of the resource for more details. + Possible Causes: The resolve dependencies operation of one ore more resources has failed. + Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. -Name : bce85a10-1ff3-4815-a677-7b188f7b441a -Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/16/2020 2:28:16 PM +Name : c2ad0066-6a69-45fe-aa70-193c240a9bc0 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 2:05:00 AM Status : Succeeded ``` -Computes, resolves and validate the dependencies of the moveresources in the Move collection. \ No newline at end of file +Compute, resolve and validate the dependencies of the Move Resources in the Move collection. \ No newline at end of file diff --git a/src/ResourceMover/exports/Add-AzResourceMoverMoveResource.ps1 b/src/ResourceMover/exports/Add-AzResourceMoverMoveResource.ps1 index a1989990ff39..e9793537d9b8 100644 --- a/src/ResourceMover/exports/Add-AzResourceMoverMoveResource.ps1 +++ b/src/ResourceMover/exports/Add-AzResourceMoverMoveResource.ps1 @@ -19,45 +19,99 @@ Creates or updates a Move Resource in the move collection. .Description Creates or updates a Move Resource in the move collection. .Example -PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name PSDemoVM -ResourceSettingResourceType "Microsoft.Compute/virtualMachines" -ResourceSettingTargetResourceName PSDemoVM - -Output: - -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migr - ate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : DependencyComputationPending -MoveStatusDetail : {} -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resou - rceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. - Possible Causes: Dependency computation is pending for resource. - Recommended Action: Validate dependencies to compute the dependencies. - -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachi - nes/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $targetResourceSettingsObj + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : DependencyComputationPending +MoveStatusErrorsPropertiesDetail : {} +MoveStatusErrorsPropertiesMessage : The dependency computation is not completed for resource - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. Possible Causes: Dependency computation is pending for resource. Recommended Action: Validate dependencies to compute the dependencies. +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $targetResourceSettingsObj = New-Object Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +PS C:\> $targetResourceSettingsObj.ResourceType = "Microsoft.Compute/virtualMachines" +$targetResourceSettingsObj.TargetResourceName = "PSDemoVM" + +.Example +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm" -Name "psdemorm" -ExistingTargetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target" + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : CommitPending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : +Type : + +.Example +PS C:\> Update-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $TargetResourceSettingObj + + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : True +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $moveResourceObj = Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" +PS C:\> $TargetResourceSettingObj = $moveResourceObj.ResourceSetting +$TargetResourceSettingObj.TargetResourceName="PSDemoVM-target" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource .Notes COMPLEX PARAMETER PROPERTIES @@ -66,11 +120,16 @@ To create the parameters described below, construct a hash table containing the DEPENDSONOVERRIDE : Gets or sets the move resource dependencies overrides. [Id ]: Gets or sets the ARM ID of the dependent resource. [TargetId ]: Gets or sets the resource ARM id of either the MoveResource or the resource ARM ID of the dependent resource. + +RESOURCESETTING : Gets or sets the resource settings. + ResourceType : The resource type. For example, the value can be Microsoft.Compute/virtualMachines. + TargetResourceName : Gets or sets the target Resource name. .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/add-azresourcemovermoveresource +https://docs.microsoft.com/powershell/module/az.resourcemover/add-azresourcemovermoveresource #> function Add-AzResourceMoverMoveResource { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource])] +[Alias('Update-AzResourceMoverMoveResource')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -101,7 +160,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[]] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[]] # Gets or sets the move resource dependencies overrides. # To construct, see NOTES section for DEPENDSONOVERRIDE properties and create a hash table. ${DependsOnOverride}, @@ -114,16 +173,10 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # The resource type. - # For example, the value can be Microsoft.Compute/virtualMachines. - ${ResourceSettingResourceType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # Gets or sets the target Resource name. - ${ResourceSettingTargetResourceName}, + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings] + # Gets or sets the resource settings. + # To construct, see NOTES section for RESOURCESETTING properties and create a hash table. + ${ResourceSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] @@ -131,19 +184,6 @@ param( # Gets or sets the Source ARM Id of the resource. ${SourceId}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # The resource type. - # For example, the value can be Microsoft.Compute/virtualMachines. - ${SourceResourceSettingResourceType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # Gets or sets the target Resource name. - ${SourceResourceSettingTargetResourceName}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/src/ResourceMover/exports/Get-AzResourceMoverMoveCollection.ps1 b/src/ResourceMover/exports/Get-AzResourceMoverMoveCollection.ps1 index f3790f99af90..37cd6b4c1c72 100644 --- a/src/ResourceMover/exports/Get-AzResourceMoverMoveCollection.ps1 +++ b/src/ResourceMover/exports/Get-AzResourceMoverMoveCollection.ps1 @@ -19,39 +19,41 @@ Gets the move collection. .Description Gets the move collection. .Example -PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId e80eb9fa-c996-4435-aa32-5af6f3d3077c +PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Location Name Type --------- ---- ---- -eastus2 mvcolle2e07001 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e34745 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e56720 Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"270119e0-0000-0c00-0000-5f5c94940000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"39015ed4-0000-0c00-0000-5f5ce2760000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections +"1000b505-0000-0c00-0000-5f69db6e0000" centraluseuap MoveCollection-cus-eus-ccy Microsoft.Migrate/moveCollections .Example -PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM -Name PS-centralus-westcentralus-demoRM +PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PS-centralus-westcentralus-demoRMS" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections .Example -PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM +PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" Location Name Type -------- ---- ---- eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections -eastus2euap PS-centralus-westcentralus-demoRM2 Microsoft.Migrate/moveCollections - +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"4e02b0a9-0000-0c00-0000-5fd101cc0000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/get-azresourcemovermovecollection +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemovermovecollection #> function Get-AzResourceMoverMoveCollection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/src/ResourceMover/exports/Get-AzResourceMoverMoveResource.ps1 b/src/ResourceMover/exports/Get-AzResourceMoverMoveResource.ps1 index 80b5ab7d593e..66255fd10eca 100644 --- a/src/ResourceMover/exports/Get-AzResourceMoverMoveResource.ps1 +++ b/src/ResourceMover/exports/Get-AzResourceMoverMoveResource.ps1 @@ -19,171 +19,208 @@ Gets the Move Resource. .Description Gets the Move Resource. .Example -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM +PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.networ - k/publicipaddresses/psdemovm-ip, /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psd - emorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet, /subscriptions/e80eb9fa-c996-4435-aa32 - -5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemovm62 -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : MovePending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemovm62 -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Network/networkInterfaces -ResourceSettingTargetResourceName : psdemovm62 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network - /networkInterfaces/psdemovm62 -SourceResourceSettingResourceType : Microsoft.Network/networkInterfaces -SourceResourceSettingTargetResourceName : psdemovm62 -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemorm -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : CommitPending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemorm -ProvisioningState : Succeeded -ResourceSettingResourceType : resourceGroups -ResourceSettingTargetResourceName : psdemorm2 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm -SourceResourceSettingResourceType : resourceGroups -SourceResourceSettingTargetResourceName : psdemorm -Target : -TargetId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psdemorm2 -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm-vnet +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemorm-vnet +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-v + net +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm-nsg +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm-nsg +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psde + movm-nsg +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +TargetId : +Type : + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : DeleteSourcePending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Type : .Example -PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Name PSDemoVM +PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : .Example -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Filter "Properties/SourceResourceName eq 'PSDemoVM'" +PS C:\WINDOWS\system32> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Filter "Properties/SourceResourceName eq 'psdemovm111'" + -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/get-azresourcemovermoveresource +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemovermoveresource #> function Get-AzResourceMoverMoveResource { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/Get-AzResourceMoverRequiredForResources.ps1 b/src/ResourceMover/exports/Get-AzResourceMoverRequiredForResources.ps1 new file mode 100644 index 000000000000..d72b5d667afb --- /dev/null +++ b/src/ResourceMover/exports/Get-AzResourceMoverRequiredForResources.ps1 @@ -0,0 +1,148 @@ + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List of the move resources for which an arm resource is required for. +.Description +List of the move resources for which an arm resource is required for. +.Example +PS C:\> Get-AzResourceMoverRequiredForResources -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups" + +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + +.Outputs +System.String +.Link +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemoverrequiredforresources +#> +function Get-AzResourceMoverRequiredForResources { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # The Move Collection Name. + ${MoveCollectionName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # The Resource Group Name. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [System.String] + # The sourceId for which the api is invoked. + ${SourceId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ + List = 'Az.ResourceMover.private\Get-AzResourceMoverRequiredForResources_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + throw + } +} + +end { + try { + $steppablePipeline.End() + } catch { + throw + } +} +} diff --git a/src/ResourceMover/exports/Get-AzResourceMoverUnresolvedDependency.ps1 b/src/ResourceMover/exports/Get-AzResourceMoverUnresolvedDependency.ps1 index 00a3f306a754..c0e5274b3d4f 100644 --- a/src/ResourceMover/exports/Get-AzResourceMoverUnresolvedDependency.ps1 +++ b/src/ResourceMover/exports/Get-AzResourceMoverUnresolvedDependency.ps1 @@ -19,20 +19,21 @@ Gets a list of unresolved dependencies. .Description Gets a list of unresolved dependencies. .Example -PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Count Id ------ -- -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/publicipaddresses/psdemovm-ip -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/virtualnetworks/psdemorm-vnet -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg +PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -DependencyLevel Descendant +Count Id +----- -- + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + 3 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/get-azresourcemoverunresolveddependency +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemoverunresolveddependency #> function Get-AzResourceMoverUnresolvedDependency { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -54,6 +55,27 @@ param( # The Subscription ID. ${SubscriptionId}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel] + # Defines the dependency level. + ${DependencyLevel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [System.String] + # The filter to apply on the operation. + # For example, $apply=filter(count eq 2). + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [System.String] + # OData order by query option. + # For example, you can use $orderby=Count desc. + ${Orderby}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/src/ResourceMover/exports/Invoke-AzResourceMoverBulkRemove.ps1 b/src/ResourceMover/exports/Invoke-AzResourceMoverBulkRemove.ps1 new file mode 100644 index 000000000000..733508de0a72 --- /dev/null +++ b/src/ResourceMover/exports/Invoke-AzResourceMoverBulkRemove.ps1 @@ -0,0 +1,213 @@ + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Removes the set of move resources included in the request body from move collection. +The orchestration is done by service. +To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. +.Description +Removes the set of move resources included in the request body from move collection. +The orchestration is done by service. +To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. +.Example +PS C:\> Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:52:28 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Message : +Name : b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:52:28 PM +Status : Succeeded + +.Example +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:58:10 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d4827071-b797-45c5-b88c-00ddd7818d42 +Message : +Name : d4827071-b797-45c5-b88c-00ddd7818d42 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:57:08 PM +Status : Succeeded +.Example +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:05:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/7b6904e2-fc3f-400d-b248-8908fcb282fb +Message : +Name : 7b6904e2-fc3f-400d-b248-8908fcb282fb +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:05:00 PM +Status : Succeeded + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus +.Link +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverbulkremove +#> +function Invoke-AzResourceMoverBulkRemove { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='BulkExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # . + ${MoveCollectionName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # . + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] + [System.String[]] + # Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property. + ${MoveResource}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType])] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType] + # Defines the move resource input type. + ${MoveResourceInputType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Gets or sets a value indicating whether the operation needs to only run pre-requisite. + ${ValidateOnly}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ + BulkExpanded = 'Az.ResourceMover.private\Invoke-AzResourceMoverBulkRemove_BulkExpanded'; + } + if (('BulkExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + throw + } +} + +end { + try { + $steppablePipeline.End() + } catch { + throw + } +} +} diff --git a/src/ResourceMover/exports/Invoke-AzResourceMoverCommit.ps1 b/src/ResourceMover/exports/Invoke-AzResourceMoverCommit.ps1 index 19eb90263351..a10539f1e5b4 100644 --- a/src/ResourceMover/exports/Invoke-AzResourceMoverCommit.ps1 +++ b/src/ResourceMover/exports/Invoke-AzResourceMoverCommit.ps1 @@ -23,61 +23,60 @@ Commits the set of resources included in the request body. The commit operation is triggered on the moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful completion the moveResource moveState do a transition to Committed. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') -ValidateOnly - - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:38:26 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/c194298b-b2eb-4aab-80b4-129d1473b75c +Message : +Name : c194298b-b2eb-4aab-80b4-129d1473b75c +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:38:25 PM Status : Succeeded .Example -PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:41:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/80c04850-7f3f-4e9c-aa68-b868978b59f3 +Message : +Name : 80c04850-7f3f-4e9c-aa68-b868978b59f3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:41:05 PM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:19:29 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Message : -Name : aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:19:28 AM +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:42:46 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d36ca519-8ced-48c9-a968-cb5e9c4db731 +Message : +Name : d36ca519-8ced-48c9-a968-cb5e9c4db731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:42:41 PM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemovercommit +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemovercommit #> function Invoke-AzResourceMoverCommit { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='CommitExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/Invoke-AzResourceMoverDiscard.ps1 b/src/ResourceMover/exports/Invoke-AzResourceMoverDiscard.ps1 index c4824cbfaf8a..79609dbcf11e 100644 --- a/src/ResourceMover/exports/Invoke-AzResourceMoverDiscard.ps1 +++ b/src/ResourceMover/exports/Invoke-AzResourceMoverDiscard.ps1 @@ -23,59 +23,59 @@ Discards the set of resources included in the request body. The discard operation is triggered on the moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 9:44:54 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/62861ceb-28c9-4e0c-811b-84692a203181 -Message : -Name : 62861ceb-28c9-4e0c-811b-84692a203181 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 9:44:54 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:39:48 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:39:37 PM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:26:51 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Message : -Name : 21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:26:39 AM +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:56:33 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:55:21 PM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:33:37 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/b842efcd-e5fd-42b0-a277-01ee8225deed -Message : -Name : b842efcd-e5fd-42b0-a277-01ee8225deed -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:33:23 AM +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:01:32 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:00:00 PM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemoverdiscard +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverdiscard #> function Invoke-AzResourceMoverDiscard { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='DiscardExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/Invoke-AzResourceMoverInitiateMove.ps1 b/src/ResourceMover/exports/Invoke-AzResourceMoverInitiateMove.ps1 index f5787a244fed..ad76918b677a 100644 --- a/src/ResourceMover/exports/Invoke-AzResourceMoverInitiateMove.ps1 +++ b/src/ResourceMover/exports/Invoke-AzResourceMoverInitiateMove.ps1 @@ -23,59 +23,59 @@ Moves the set of resources included in the request body. The move operation is triggered after the moveResources are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly - - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:07:36 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Message : -Name : 8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:07:35 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 9:39:37 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 9:39:37 AM Status : Succeeded .Example -PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:24:21 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/bc30d933-c2b6-47c9-b583-240d375b5864 -Message : -Name : bc30d933-c2b6-47c9-b583-240d375b5864 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:24:21 AM +PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 11:56:33 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 11:55:21 AM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:38:33 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/cbc0f921-de9b-45d5-91da-60e36b841b10 -Message : -Name : cbc0f921-de9b-45d5-91da-60e36b841b10 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:37:23 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:01:35 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:00:21 PM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemoverinitiatemove +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverinitiatemove #> function Invoke-AzResourceMoverInitiateMove { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='InitiateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/Invoke-AzResourceMoverPrepare.ps1 b/src/ResourceMover/exports/Invoke-AzResourceMoverPrepare.ps1 index c4a5e8e188a1..1462500fd677 100644 --- a/src/ResourceMover/exports/Invoke-AzResourceMoverPrepare.ps1 +++ b/src/ResourceMover/exports/Invoke-AzResourceMoverPrepare.ps1 @@ -23,60 +23,71 @@ Initiates prepare for the set of resources included in the request body. The prepare operation is on the moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm') -ValidateOnly +PS C:\> $resp = Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemovm') -ValidateOnly AdditionalInfo : {Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfo} Code : MoveCollectionMissingRequiredDependentResources Detail : {} -EndTime : 8/21/2020 6:04:15 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr - ate/MoveCollections/MoveCollection-cus-wcus-eus2/operations/12d055bd-ac52-427f-8b05-b4b21c4b51e8 +EndTime : 2/9/2021 9:04:15 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr + ate/MoveCollections/PS-centralus-westcentralus-demoRMS/12d055bd-ac52-427f-8b05-b4b21c4b51e8 Message : The operation has failed as required move resources are missing from the input. Possible Causes: Dependent resources are missing from the input. Recommended Action: Retry the operation with all required resources, if the issue persist contact support. Name : 12d055bd-ac52-427f-8b05-b4b21c4b51e8 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:04:14 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 9:04:14 AM Status : Failed -.Example -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm','psdemovm62', 'PSDemoVM-ip', 'PSDemoRM-vnet','PSDemoVM-nsg') +PS C:> $resp.Code +MoveCollectionMissingRequiredDependentResources -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:18:09 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Message : -Name : da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:18:08 AM +PS C:> $resp.AdditionalInfo[0].InfoMoveResource + +SourceId +-------- +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + +.Example +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM','psdemovm111', 'PSDemoRM-vnet','PSDemoVM-nsg') + +AAdditionalInfo : +Code : +Detail : +EndTime : 2/9/2021 11:25:13 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/49e4429 + 4-24ac-4eac-93da-e7e1c815554d +Message : +Name : 49e44294-24ac-4eac-93da-e7e1c815554d +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 10:55:53 AM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRMS/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') AdditionalInfo : Code : Detail : -EndTime : 8/21/2020 5:35:30 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 +EndTime : 2/9/2021 11:09:30 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/MoveColl + ections/PS-centralus-westcentralus-demoRMS/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 Message : Name : c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:35:27 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 11:05:27 AM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemoverprepare +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverprepare #> function Invoke-AzResourceMoverPrepare { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='PrepareExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/New-AzResourceMoverMoveCollection.ps1 b/src/ResourceMover/exports/New-AzResourceMoverMoveCollection.ps1 index 82076b57c90e..5d4c28df5872 100644 --- a/src/ResourceMover/exports/New-AzResourceMoverMoveCollection.ps1 +++ b/src/ResourceMover/exports/New-AzResourceMoverMoveCollection.ps1 @@ -19,19 +19,19 @@ Creates or updates a move collection. .Description Creates or updates a move collection. .Example -PS C:\> New-AzResourceMoverMoveCollection -Name PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -SourceRegion centralus -TargetRegion westcentralus -Location eastus2 +PS C:\> New-AzResourceMoverMoveCollection -Name "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceRegion "centralus" -TargetRegion "westcentralus" -Location "centraluseuap" -IdentityType "SystemAssigned" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"0200d92f-0000-3300-0000-6021e9ec0000" centraluseuap PS-centralus-westcentralus-demoRMs Microsoft.Migrate/moveCollections .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/new-azresourcemovermovecollection +https://docs.microsoft.com/powershell/module/az.resourcemover/new-azresourcemovermovecollection #> function New-AzResourceMoverMoveCollection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -70,7 +70,7 @@ param( [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType] - # The type of identity used for the region move service. + # The type of identity used for the resource mover service. ${IdentityType}, [Parameter()] @@ -87,7 +87,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/src/ResourceMover/exports/ProxyCmdletDefinitions.ps1 b/src/ResourceMover/exports/ProxyCmdletDefinitions.ps1 index 03f44ee78f40..f5f24bc19aab 100644 --- a/src/ResourceMover/exports/ProxyCmdletDefinitions.ps1 +++ b/src/ResourceMover/exports/ProxyCmdletDefinitions.ps1 @@ -19,45 +19,99 @@ Creates or updates a Move Resource in the move collection. .Description Creates or updates a Move Resource in the move collection. .Example -PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name PSDemoVM -ResourceSettingResourceType "Microsoft.Compute/virtualMachines" -ResourceSettingTargetResourceName PSDemoVM - -Output: - -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migr - ate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : DependencyComputationPending -MoveStatusDetail : {} -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resou - rceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. - Possible Causes: Dependency computation is pending for resource. - Recommended Action: Validate dependencies to compute the dependencies. - -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachi - nes/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $targetResourceSettingsObj + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : DependencyComputationPending +MoveStatusErrorsPropertiesDetail : {} +MoveStatusErrorsPropertiesMessage : The dependency computation is not completed for resource - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. Possible Causes: Dependency computation is pending for resource. Recommended Action: Validate dependencies to compute the dependencies. +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $targetResourceSettingsObj = New-Object Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +PS C:\> $targetResourceSettingsObj.ResourceType = "Microsoft.Compute/virtualMachines" +$targetResourceSettingsObj.TargetResourceName = "PSDemoVM" + +.Example +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm" -Name "psdemorm" -ExistingTargetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target" + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : CommitPending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : +Type : + +.Example +PS C:\> Update-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $TargetResourceSettingObj + + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : True +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $moveResourceObj = Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" +PS C:\> $TargetResourceSettingObj = $moveResourceObj.ResourceSetting +$TargetResourceSettingObj.TargetResourceName="PSDemoVM-target" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource .Notes COMPLEX PARAMETER PROPERTIES @@ -66,11 +120,16 @@ To create the parameters described below, construct a hash table containing the DEPENDSONOVERRIDE : Gets or sets the move resource dependencies overrides. [Id ]: Gets or sets the ARM ID of the dependent resource. [TargetId ]: Gets or sets the resource ARM id of either the MoveResource or the resource ARM ID of the dependent resource. + +RESOURCESETTING : Gets or sets the resource settings. + ResourceType : The resource type. For example, the value can be Microsoft.Compute/virtualMachines. + TargetResourceName : Gets or sets the target Resource name. .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/add-azresourcemovermoveresource +https://docs.microsoft.com/powershell/module/az.resourcemover/add-azresourcemovermoveresource #> function Add-AzResourceMoverMoveResource { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource])] +[Alias('Update-AzResourceMoverMoveResource')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -101,7 +160,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[]] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[]] # Gets or sets the move resource dependencies overrides. # To construct, see NOTES section for DEPENDSONOVERRIDE properties and create a hash table. ${DependsOnOverride}, @@ -114,16 +173,10 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # The resource type. - # For example, the value can be Microsoft.Compute/virtualMachines. - ${ResourceSettingResourceType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # Gets or sets the target Resource name. - ${ResourceSettingTargetResourceName}, + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings] + # Gets or sets the resource settings. + # To construct, see NOTES section for RESOURCESETTING properties and create a hash table. + ${ResourceSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] @@ -131,19 +184,6 @@ param( # Gets or sets the Source ARM Id of the resource. ${SourceId}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # The resource type. - # For example, the value can be Microsoft.Compute/virtualMachines. - ${SourceResourceSettingResourceType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [System.String] - # Gets or sets the target Resource name. - ${SourceResourceSettingTargetResourceName}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -263,39 +303,41 @@ Gets the move collection. .Description Gets the move collection. .Example -PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId e80eb9fa-c996-4435-aa32-5af6f3d3077c +PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Location Name Type --------- ---- ---- -eastus2 mvcolle2e07001 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e34745 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e56720 Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"270119e0-0000-0c00-0000-5f5c94940000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"39015ed4-0000-0c00-0000-5f5ce2760000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections +"1000b505-0000-0c00-0000-5f69db6e0000" centraluseuap MoveCollection-cus-eus-ccy Microsoft.Migrate/moveCollections .Example -PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM -Name PS-centralus-westcentralus-demoRM +PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PS-centralus-westcentralus-demoRMS" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections .Example -PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM +PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" Location Name Type -------- ---- ---- eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections -eastus2euap PS-centralus-westcentralus-demoRM2 Microsoft.Migrate/moveCollections - +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"4e02b0a9-0000-0c00-0000-5fd101cc0000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/get-azresourcemovermovecollection +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemovermovecollection #> function Get-AzResourceMoverMoveCollection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -428,171 +470,208 @@ Gets the Move Resource. .Description Gets the Move Resource. .Example -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM - -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : - -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.networ - k/publicipaddresses/psdemovm-ip, /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psd - emorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet, /subscriptions/e80eb9fa-c996-4435-aa32 - -5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemovm62 -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : MovePending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemovm62 -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Network/networkInterfaces -ResourceSettingTargetResourceName : psdemovm62 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network - /networkInterfaces/psdemovm62 -SourceResourceSettingResourceType : Microsoft.Network/networkInterfaces -SourceResourceSettingTargetResourceName : psdemovm62 -Target : -TargetId : -Type : - -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemorm -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : CommitPending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemorm -ProvisioningState : Succeeded -ResourceSettingResourceType : resourceGroups -ResourceSettingTargetResourceName : psdemorm2 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm -SourceResourceSettingResourceType : resourceGroups -SourceResourceSettingTargetResourceName : psdemorm -Target : -TargetId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psdemorm2 -Type : +PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm-vnet +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemorm-vnet +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-v + net +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm-nsg +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm-nsg +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psde + movm-nsg +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +TargetId : +Type : + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : DeleteSourcePending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Type : .Example -PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Name PSDemoVM +PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : .Example -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Filter "Properties/SourceResourceName eq 'PSDemoVM'" - -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +PS C:\WINDOWS\system32> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Filter "Properties/SourceResourceName eq 'psdemovm111'" + + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/get-azresourcemovermoveresource +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemovermoveresource #> function Get-AzResourceMoverMoveResource { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -730,26 +809,175 @@ end { # limitations under the License. # ---------------------------------------------------------------------------------- +<# +.Synopsis +List of the move resources for which an arm resource is required for. +.Description +List of the move resources for which an arm resource is required for. +.Example +PS C:\> Get-AzResourceMoverRequiredForResources -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups" + +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + +.Outputs +System.String +.Link +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemoverrequiredforresources +#> +function Get-AzResourceMoverRequiredForResources { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # The Move Collection Name. + ${MoveCollectionName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # The Resource Group Name. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [System.String] + # The sourceId for which the api is invoked. + ${SourceId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ + List = 'Az.ResourceMover.private\Get-AzResourceMoverRequiredForResources_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + throw + } +} + +end { + try { + $steppablePipeline.End() + } catch { + throw + } +} +} + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + <# .Synopsis Gets a list of unresolved dependencies. .Description Gets a list of unresolved dependencies. .Example -PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Count Id ------ -- -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/publicipaddresses/psdemovm-ip -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/virtualnetworks/psdemorm-vnet -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg +PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -DependencyLevel Descendant +Count Id +----- -- + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + 3 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/get-azresourcemoverunresolveddependency +https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemoverunresolveddependency #> function Get-AzResourceMoverUnresolvedDependency { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -771,6 +999,27 @@ param( # The Subscription ID. ${SubscriptionId}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel] + # Defines the dependency level. + ${DependencyLevel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [System.String] + # The filter to apply on the operation. + # For example, $apply=filter(count eq 2). + ${Filter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Query')] + [System.String] + # OData order by query option. + # For example, you can use $orderby=Count desc. + ${Orderby}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -872,6 +1121,219 @@ end { # limitations under the License. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Removes the set of move resources included in the request body from move collection. +The orchestration is done by service. +To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. +.Description +Removes the set of move resources included in the request body from move collection. +The orchestration is done by service. +To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. +.Example +PS C:\> Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:52:28 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Message : +Name : b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:52:28 PM +Status : Succeeded + +.Example +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:58:10 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d4827071-b797-45c5-b88c-00ddd7818d42 +Message : +Name : d4827071-b797-45c5-b88c-00ddd7818d42 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:57:08 PM +Status : Succeeded +.Example +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:05:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/7b6904e2-fc3f-400d-b248-8908fcb282fb +Message : +Name : 7b6904e2-fc3f-400d-b248-8908fcb282fb +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:05:00 PM +Status : Succeeded + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus +.Link +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverbulkremove +#> +function Invoke-AzResourceMoverBulkRemove { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='BulkExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # . + ${MoveCollectionName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [System.String] + # . + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] + [System.String[]] + # Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property. + ${MoveResource}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType])] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType] + # Defines the move resource input type. + ${MoveResourceInputType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Gets or sets a value indicating whether the operation needs to only run pre-requisite. + ${ValidateOnly}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ + BulkExpanded = 'Az.ResourceMover.private\Invoke-AzResourceMoverBulkRemove_BulkExpanded'; + } + if (('BulkExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + throw + } +} + +end { + try { + $steppablePipeline.End() + } catch { + throw + } +} +} + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + <# .Synopsis Commits the set of resources included in the request body. @@ -882,61 +1344,60 @@ Commits the set of resources included in the request body. The commit operation is triggered on the moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful completion the moveResource moveState do a transition to Committed. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') -ValidateOnly - +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:38:26 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/c194298b-b2eb-4aab-80b4-129d1473b75c +Message : +Name : c194298b-b2eb-4aab-80b4-129d1473b75c +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:38:25 PM Status : Succeeded .Example -PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') +PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:41:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/80c04850-7f3f-4e9c-aa68-b868978b59f3 +Message : +Name : 80c04850-7f3f-4e9c-aa68-b868978b59f3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:41:05 PM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM') +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:19:29 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Message : -Name : aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:19:28 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:42:46 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d36ca519-8ced-48c9-a968-cb5e9c4db731 +Message : +Name : d36ca519-8ced-48c9-a968-cb5e9c4db731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:42:41 PM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemovercommit +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemovercommit #> function Invoke-AzResourceMoverCommit { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='CommitExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1100,59 +1561,59 @@ Discards the set of resources included in the request body. The discard operation is triggered on the moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 9:44:54 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/62861ceb-28c9-4e0c-811b-84692a203181 -Message : -Name : 62861ceb-28c9-4e0c-811b-84692a203181 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 9:44:54 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:39:48 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:39:37 PM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:26:51 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Message : -Name : 21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:26:39 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:56:33 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:55:21 PM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:33:37 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/b842efcd-e5fd-42b0-a277-01ee8225deed -Message : -Name : b842efcd-e5fd-42b0-a277-01ee8225deed -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:33:23 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:01:32 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:00:00 PM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemoverdiscard +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverdiscard #> function Invoke-AzResourceMoverDiscard { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='DiscardExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1317,59 +1778,59 @@ Moves the set of resources included in the request body. The move operation is triggered after the moveResources are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:07:36 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Message : -Name : 8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:07:35 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 9:39:37 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 9:39:37 AM Status : Succeeded .Example -PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') +PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:24:21 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/bc30d933-c2b6-47c9-b583-240d375b5864 -Message : -Name : bc30d933-c2b6-47c9-b583-240d375b5864 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:24:21 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 11:56:33 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 11:55:21 AM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:38:33 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/cbc0f921-de9b-45d5-91da-60e36b841b10 -Message : -Name : cbc0f921-de9b-45d5-91da-60e36b841b10 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:37:23 AM +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:01:35 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:00:21 PM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemoverinitiatemove +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverinitiatemove #> function Invoke-AzResourceMoverInitiateMove { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='InitiateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1533,60 +1994,71 @@ Initiates prepare for the set of resources included in the request body. The prepare operation is on the moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. .Example -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm') -ValidateOnly +PS C:\> $resp = Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemovm') -ValidateOnly AdditionalInfo : {Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfo} Code : MoveCollectionMissingRequiredDependentResources Detail : {} -EndTime : 8/21/2020 6:04:15 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr - ate/MoveCollections/MoveCollection-cus-wcus-eus2/operations/12d055bd-ac52-427f-8b05-b4b21c4b51e8 +EndTime : 2/9/2021 9:04:15 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr + ate/MoveCollections/PS-centralus-westcentralus-demoRMS/12d055bd-ac52-427f-8b05-b4b21c4b51e8 Message : The operation has failed as required move resources are missing from the input. Possible Causes: Dependent resources are missing from the input. Recommended Action: Retry the operation with all required resources, if the issue persist contact support. Name : 12d055bd-ac52-427f-8b05-b4b21c4b51e8 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:04:14 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 9:04:14 AM Status : Failed -.Example -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm','psdemovm62', 'PSDemoVM-ip', 'PSDemoRM-vnet','PSDemoVM-nsg') +PS C:> $resp.Code +MoveCollectionMissingRequiredDependentResources -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:18:09 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Message : -Name : da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:18:08 AM +PS C:> $resp.AdditionalInfo[0].InfoMoveResource + +SourceId +-------- +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + +.Example +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM','psdemovm111', 'PSDemoRM-vnet','PSDemoVM-nsg') + +AAdditionalInfo : +Code : +Detail : +EndTime : 2/9/2021 11:25:13 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/49e4429 + 4-24ac-4eac-93da-e7e1c815554d +Message : +Name : 49e44294-24ac-4eac-93da-e7e1c815554d +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 10:55:53 AM Status : Succeeded .Example -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRMS/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') AdditionalInfo : Code : Detail : -EndTime : 8/21/2020 5:35:30 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 +EndTime : 2/9/2021 11:09:30 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/MoveColl + ections/PS-centralus-westcentralus-demoRMS/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 Message : Name : c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:35:27 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 11:05:27 AM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/invoke-azresourcemoverprepare +https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverprepare #> function Invoke-AzResourceMoverPrepare { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='PrepareExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1746,19 +2218,19 @@ Creates or updates a move collection. .Description Creates or updates a move collection. .Example -PS C:\> New-AzResourceMoverMoveCollection -Name PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -SourceRegion centralus -TargetRegion westcentralus -Location eastus2 +PS C:\> New-AzResourceMoverMoveCollection -Name "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceRegion "centralus" -TargetRegion "westcentralus" -Location "centraluseuap" -IdentityType "SystemAssigned" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"0200d92f-0000-3300-0000-6021e9ec0000" centraluseuap PS-centralus-westcentralus-demoRMs Microsoft.Migrate/moveCollections .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/new-azresourcemovermovecollection +https://docs.microsoft.com/powershell/module/az.resourcemover/new-azresourcemovermovecollection #> function New-AzResourceMoverMoveCollection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1797,7 +2269,7 @@ param( [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType] - # The type of identity used for the region move service. + # The type of identity used for the resource mover service. ${IdentityType}, [Parameter()] @@ -1814,7 +2286,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -1932,27 +2404,27 @@ Deletes a move collection. .Description Deletes a move collection. .Example -PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" - - AdditionalInfo : - Code : - Detail : - EndTime : 8/12/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866d6 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/12/2020 3:27:27 PM - Status : Succeeded +PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" + +AdditionalInfo : +Code : +Detail : +EndTime : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/ec788761-2f1b-46a2-97b7-f5056afd334d +Message : +Name : +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : +Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/remove-azresourcemovermovecollection +https://docs.microsoft.com/powershell/module/az.resourcemover/remove-azresourcemovermovecollection #> function Remove-AzResourceMoverMoveCollection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2100,28 +2572,28 @@ Deletes a Move Resource from the move collection. .Description Deletes a Move Resource from the move collection. .Example -PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -Name "psdemorm" +PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -Name "psdemorm-vnet" - AdditionalInfo : - Code : - Detail : - EndTime : 8/11/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866c5 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/11/2020 3:27:27 PM - Status : Succeeded +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:08:49 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Message : +Name : bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:08:47 PM +Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/remove-azresourcemovermoveresource +https://docs.microsoft.com/powershell/module/az.resourcemover/remove-azresourcemovermoveresource #> function Remove-AzResourceMoverMoveResource { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2275,30 +2747,30 @@ Computes, resolves and validate the dependencies of the moveResources in the mov .Description Computes, resolves and validate the dependencies of the moveResources in the move collection. .Example -PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" +PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" AdditionalInfo : Code : MoveCollectionResolveDependenciesOperationFailed Detail : {} -EndTime : 8/16/2020 2:28:18 PM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveCollections/PS-ce - ntralus-westcentralus-demoRM/operations/bce85a10-1ff3-4815-a677-7b188f7b441a -Message : The resolve dependencies operation of one ore more resources has failed. Check the move status of the resource for more details. -Possible Causes: The resolve dependencies operation of one ore more resources has failed. -Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. +EndTime : 2/9/2021 2:05:04 AM +Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/c2ad006 + 6-6a69-45fe-aa70-193c240a9bc0 +Message : The resolve dependencies operation of one or more resources has failed. Check the move status of the resource for more details. + Possible Causes: The resolve dependencies operation of one ore more resources has failed. + Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. -Name : bce85a10-1ff3-4815-a677-7b188f7b441a -Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/16/2020 2:28:16 PM +Name : c2ad0066-6a69-45fe-aa70-193c240a9bc0 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 2:05:00 AM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/resolve-azresourcemovermovecollectiondependency +https://docs.microsoft.com/powershell/module/az.resourcemover/resolve-azresourcemovermovecollectiondependency #> function Resolve-AzResourceMoverMoveCollectionDependency { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Resolve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/Remove-AzResourceMoverMoveCollection.ps1 b/src/ResourceMover/exports/Remove-AzResourceMoverMoveCollection.ps1 index 6c9cce6b9b00..cd226bf51316 100644 --- a/src/ResourceMover/exports/Remove-AzResourceMoverMoveCollection.ps1 +++ b/src/ResourceMover/exports/Remove-AzResourceMoverMoveCollection.ps1 @@ -19,27 +19,27 @@ Deletes a move collection. .Description Deletes a move collection. .Example -PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" - - AdditionalInfo : - Code : - Detail : - EndTime : 8/12/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866d6 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/12/2020 3:27:27 PM - Status : Succeeded +PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" + +AdditionalInfo : +Code : +Detail : +EndTime : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/ec788761-2f1b-46a2-97b7-f5056afd334d +Message : +Name : +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : +Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/remove-azresourcemovermovecollection +https://docs.microsoft.com/powershell/module/az.resourcemover/remove-azresourcemovermovecollection #> function Remove-AzResourceMoverMoveCollection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/Remove-AzResourceMoverMoveResource.ps1 b/src/ResourceMover/exports/Remove-AzResourceMoverMoveResource.ps1 index 53bc7f4518e1..94f58277e6b8 100644 --- a/src/ResourceMover/exports/Remove-AzResourceMoverMoveResource.ps1 +++ b/src/ResourceMover/exports/Remove-AzResourceMoverMoveResource.ps1 @@ -19,28 +19,28 @@ Deletes a Move Resource from the move collection. .Description Deletes a Move Resource from the move collection. .Example -PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -Name "psdemorm" +PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -Name "psdemorm-vnet" - AdditionalInfo : - Code : - Detail : - EndTime : 8/11/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866c5 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/11/2020 3:27:27 PM - Status : Succeeded +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:08:49 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Message : +Name : bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:08:47 PM +Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/remove-azresourcemovermoveresource +https://docs.microsoft.com/powershell/module/az.resourcemover/remove-azresourcemovermoveresource #> function Remove-AzResourceMoverMoveResource { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/exports/Resolve-AzResourceMoverMoveCollectionDependency.ps1 b/src/ResourceMover/exports/Resolve-AzResourceMoverMoveCollectionDependency.ps1 index 2289b3a98edc..497199becccd 100644 --- a/src/ResourceMover/exports/Resolve-AzResourceMoverMoveCollectionDependency.ps1 +++ b/src/ResourceMover/exports/Resolve-AzResourceMoverMoveCollectionDependency.ps1 @@ -19,30 +19,30 @@ Computes, resolves and validate the dependencies of the moveResources in the mov .Description Computes, resolves and validate the dependencies of the moveResources in the move collection. .Example -PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" +PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" AdditionalInfo : Code : MoveCollectionResolveDependenciesOperationFailed Detail : {} -EndTime : 8/16/2020 2:28:18 PM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveCollections/PS-ce - ntralus-westcentralus-demoRM/operations/bce85a10-1ff3-4815-a677-7b188f7b441a -Message : The resolve dependencies operation of one ore more resources has failed. Check the move status of the resource for more details. -Possible Causes: The resolve dependencies operation of one ore more resources has failed. -Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. +EndTime : 2/9/2021 2:05:04 AM +Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/c2ad006 + 6-6a69-45fe-aa70-193c240a9bc0 +Message : The resolve dependencies operation of one or more resources has failed. Check the move status of the resource for more details. + Possible Causes: The resolve dependencies operation of one ore more resources has failed. + Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. -Name : bce85a10-1ff3-4815-a677-7b188f7b441a -Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/16/2020 2:28:16 PM +Name : c2ad0066-6a69-45fe-aa70-193c240a9bc0 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 2:05:00 AM Status : Succeeded .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus .Link -https://docs.microsoft.com/en-us/powershell/module/az.resourcemover/resolve-azresourcemovermovecollectiondependency +https://docs.microsoft.com/powershell/module/az.resourcemover/resolve-azresourcemovermovecollectiondependency #> function Resolve-AzResourceMoverMoveCollectionDependency { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Resolve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ResourceMover/generate-info.json b/src/ResourceMover/generate-info.json index 2b5ae9f6bc5f..c13c812770fd 100644 --- a/src/ResourceMover/generate-info.json +++ b/src/ResourceMover/generate-info.json @@ -1,8 +1,8 @@ { - "autorest_core": "3.0.6306", - "autorest_remodeler": "2.1.27", - "autorest": "3.0.6187", - "node": "v10.16.0", - "autorest_powershell": "2.1.400", - "swagger_commit": "f19ed0186981aa6fe7d0f8570e160b5db603772b" + "autorest_powershell": "3.0.423", + "autorest_modelerfour": "4.15.414", + "autorest_core": "3.0.6375", + "swagger_commit": "36b9a02ed3cec327d20a7917623d6f07ae84c90b", + "node": "v14.15.5", + "autorest": "`-- (empty)" } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Any.PowerShell.cs similarity index 75% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Any.PowerShell.cs index 8084f46bb703..d4ba45a898e4 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Any.PowerShell.cs @@ -1,10 +1,15 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - /// Class for operation result properties. - [System.ComponentModel.TypeConverter(typeof(OperationStatusPropertiesTypeConverter))] - public partial class OperationStatusProperties + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any { /// @@ -48,46 +53,11 @@ public partial class OperationStatusProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationStatusProperties(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.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationStatusProperties(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.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationStatusProperties(global::System.Collections.IDictionary content) + internal Any(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -100,11 +70,11 @@ internal OperationStatusProperties(global::System.Collections.IDictionary conten } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationStatusProperties(global::System.Management.Automation.PSObject content) + internal Any(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -116,14 +86,47 @@ internal OperationStatusProperties(global::System.Management.Automation.PSObject 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.ResourceMover.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Class for operation result properties. - [System.ComponentModel.TypeConverter(typeof(OperationStatusPropertiesTypeConverter))] - public partial interface IOperationStatusProperties + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny { diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Any.TypeConverter.cs similarity index 84% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Any.TypeConverter.cs index 3fac4d184a53..b329a0a32e0c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Any.TypeConverter.cs @@ -1,11 +1,16 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class OperationStatusPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -24,10 +29,10 @@ public partial class OperationStatusPropertiesTypeConverter : global::System.Man /// Determines if the converter can convert the parameter to the /// parameter. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -89,7 +94,7 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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); @@ -97,24 +102,24 @@ public static bool CanConvertFrom(dynamic sourceValue) /// Converts the parameter to the parameter using and /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny).IsAssignableFrom(type)) { return sourceValue; } try { - return OperationStatusProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -122,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return OperationStatusProperties.DeserializeFromPSObject(sourceValue); + return Any.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return OperationStatusProperties.DeserializeFromDictionary(sourceValue); + return Any.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/ResourceMover/generated/api/Models/Any.cs b/src/ResourceMover/generated/api/Models/Any.cs new file mode 100644 index 000000000000..6cdb3b3ae83d --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Any object + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Any object + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + + } + /// Any object + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Any.json.cs b/src/ResourceMover/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..789b3f3a875e --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Any.json.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Any object + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.PowerShell.cs deleted file mode 100644 index ab0e7282cdb0..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.PowerShell.cs +++ /dev/null @@ -1,157 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Define the move collection. - [System.ComponentModel.TypeConverter(typeof(MoveCollectionTypeConverter))] - public partial class MoveCollection - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new MoveCollection(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.ResourceMover.Models.Api20191001Preview.IMoveCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new MoveCollection(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.ResourceMover.Models.Api20191001Preview.IMoveCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal MoveCollection(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).SourceRegion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).TargetRegion, 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 MoveCollection(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Location, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).SourceRegion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal)this).TargetRegion, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Define the move collection. - [System.ComponentModel.TypeConverter(typeof(MoveCollectionTypeConverter))] - public partial interface IMoveCollection - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.cs deleted file mode 100644 index aa5f8fa10ff2..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.cs +++ /dev/null @@ -1,234 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - - /// Define the move collection. - public partial class MoveCollection : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal - { - - /// Backing field for property. - private string _id; - - /// Fully qualified resource Id for the resource. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity _identity; - - /// Defines the MSI properties of the Move Collection. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity()); set => this._identity = value; } - - /// Gets or sets the principal id. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).PrincipalId = value; } - - /// Gets or sets the tenant id. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).TenantId = value; } - - /// The type of identity used for the region move service. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).Type = value; } - - /// Backing field for property. - private string _location; - - /// The geo-location where the resource lives. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity()); set { {_identity = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties _property; - - /// Defines the move collection properties. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionProperties()); set => this._property = value; } - - /// Defines the provisioning states. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)Property).ProvisioningState; } - - /// Gets or sets the source region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SourceRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)Property).SourceRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)Property).SourceRegion = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTags()); set => this._tag = value; } - - /// Gets or sets the target region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)Property).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)Property).TargetRegion = value; } - - /// Backing field for property. - private string _type; - - /// The type of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string Type { get => this._type; } - - /// Creates an new instance. - public MoveCollection() - { - - } - } - /// Define the move collection. - public partial interface IMoveCollection : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable - { - /// Fully qualified resource Id for the resource. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource Id for the resource.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// Gets or sets the principal id. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets or sets the principal id.", - SerializedName = @"principalId", - PossibleTypes = new [] { typeof(string) })] - string IdentityPrincipalId { get; set; } - /// Gets or sets the tenant id. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets or sets the tenant id.", - SerializedName = @"tenantId", - PossibleTypes = new [] { typeof(string) })] - string IdentityTenantId { get; set; } - /// The type of identity used for the region move service. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity used for the region move service.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } - /// The geo-location where the resource lives. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives.", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the resource", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// Defines the provisioning states. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Defines the provisioning states.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; } - /// Gets or sets the source region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Gets or sets the source region.", - SerializedName = @"sourceRegion", - PossibleTypes = new [] { typeof(string) })] - string SourceRegion { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags Tag { get; set; } - /// Gets or sets the target region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Gets or sets the target region.", - SerializedName = @"targetRegion", - PossibleTypes = new [] { typeof(string) })] - string TargetRegion { get; set; } - /// The type of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The type of the resource.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } - - } - /// Define the move collection. - internal partial interface IMoveCollectionInternal - - { - /// Fully qualified resource Id for the resource. - string Id { get; set; } - /// Defines the MSI properties of the Move Collection. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Identity { get; set; } - /// Gets or sets the principal id. - string IdentityPrincipalId { get; set; } - /// Gets or sets the tenant id. - string IdentityTenantId { get; set; } - /// The type of identity used for the region move service. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } - /// The geo-location where the resource lives. - string Location { get; set; } - /// The name of the resource - string Name { get; set; } - /// Defines the move collection properties. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties Property { get; set; } - /// Defines the provisioning states. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; set; } - /// Gets or sets the source region. - string SourceRegion { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags Tag { get; set; } - /// Gets or sets the target region. - string TargetRegion { get; set; } - /// The type of the resource. - string Type { get; set; } - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.PowerShell.cs deleted file mode 100644 index 1573250cb479..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.PowerShell.cs +++ /dev/null @@ -1,137 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Defines the move collection properties. - [System.ComponentModel.TypeConverter(typeof(MoveCollectionPropertiesTypeConverter))] - public partial class MoveCollectionProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new MoveCollectionProperties(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.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new MoveCollectionProperties(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.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal MoveCollectionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).SourceRegion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).TargetRegion, 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 MoveCollectionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).SourceRegion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal)this).TargetRegion, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Defines the move collection properties. - [System.ComponentModel.TypeConverter(typeof(MoveCollectionPropertiesTypeConverter))] - public partial interface IMoveCollectionProperties - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.cs deleted file mode 100644 index 2c66e69916c9..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - - /// Defines the move collection properties. - public partial class MoveCollectionProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal - { - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? _provisioningState; - - /// Defines the provisioning states. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private string _sourceRegion; - - /// Gets or sets the source region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string SourceRegion { get => this._sourceRegion; set => this._sourceRegion = value; } - - /// Backing field for property. - private string _targetRegion; - - /// Gets or sets the target region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string TargetRegion { get => this._targetRegion; set => this._targetRegion = value; } - - /// Creates an new instance. - public MoveCollectionProperties() - { - - } - } - /// Defines the move collection properties. - public partial interface IMoveCollectionProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable - { - /// Defines the provisioning states. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Defines the provisioning states.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; } - /// Gets or sets the source region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Gets or sets the source region.", - SerializedName = @"sourceRegion", - PossibleTypes = new [] { typeof(string) })] - string SourceRegion { get; set; } - /// Gets or sets the target region. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Gets or sets the target region.", - SerializedName = @"targetRegion", - PossibleTypes = new [] { typeof(string) })] - string TargetRegion { get; set; } - - } - /// Defines the move collection properties. - internal partial interface IMoveCollectionPropertiesInternal - - { - /// Defines the provisioning states. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; set; } - /// Gets or sets the source region. - string SourceRegion { get; set; } - /// Gets or sets the target region. - string TargetRegion { get; set; } - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.PowerShell.cs deleted file mode 100644 index 9f052f875d15..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.PowerShell.cs +++ /dev/null @@ -1,197 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Defines the move resource. - [System.ComponentModel.TypeConverter(typeof(MoveResourceTypeConverter))] - public partial class MoveResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new MoveResource(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.ResourceMover.Models.Api20191001Preview.IMoveResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new MoveResource(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.ResourceMover.Models.Api20191001Preview.IMoveResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal MoveResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ExistingTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrorsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).TargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingResourceType = (string) content.GetValueForProperty("ResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingTargetResourceName = (string) content.GetValueForProperty("ResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingResourceType = (string) content.GetValueForProperty("SourceResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingTargetResourceName = (string) content.GetValueForProperty("SourceResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("MoveStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobProgress = (string) content.GetValueForProperty("MoveStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTargetId = (string) content.GetValueForProperty("MoveStatusTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorTarget = (string) content.GetValueForProperty("ErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMessage = (string) content.GetValueForProperty("MoveStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusCode = (string) content.GetValueForProperty("MoveStatusCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTarget = (string) content.GetValueForProperty("MoveStatusTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTarget, 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 MoveResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ExistingTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrorsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).TargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingResourceType = (string) content.GetValueForProperty("ResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingTargetResourceName = (string) content.GetValueForProperty("ResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingResourceType = (string) content.GetValueForProperty("SourceResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingTargetResourceName = (string) content.GetValueForProperty("SourceResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).SourceResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("MoveStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobProgress = (string) content.GetValueForProperty("MoveStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTargetId = (string) content.GetValueForProperty("MoveStatusTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorTarget = (string) content.GetValueForProperty("ErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).ErrorMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMessage = (string) content.GetValueForProperty("MoveStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusCode = (string) content.GetValueForProperty("MoveStatusCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTarget = (string) content.GetValueForProperty("MoveStatusTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal)this).MoveStatusTarget, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Defines the move resource. - [System.ComponentModel.TypeConverter(typeof(MoveResourceTypeConverter))] - public partial interface IMoveResource - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.cs deleted file mode 100644 index 2bd6d2716a1d..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - - /// Defines the collection of move resources. - public partial class MoveResourceCollection : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal - { - - /// Backing field for property. - private string _nextLink; - - /// Gets the value of next link. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource[] _value; - - /// Gets the list of move resources. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource[] Value { get => this._value; set => this._value = value; } - - /// Creates an new instance. - public MoveResourceCollection() - { - - } - } - /// Defines the collection of move resources. - public partial interface IMoveResourceCollection : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable - { - /// Gets the value of next link. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets the value of next link.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// Gets the list of move resources. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets the list of move resources.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource[] Value { get; set; } - - } - /// Defines the collection of move resources. - internal partial interface IMoveResourceCollectionInternal - - { - /// Gets the value of next link. - string NextLink { get; set; } - /// Gets the list of move resources. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.PowerShell.cs deleted file mode 100644 index 47775c990557..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.PowerShell.cs +++ /dev/null @@ -1,191 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Defines the move resource properties. - [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesTypeConverter))] - public partial class MoveResourceProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new MoveResourceProperties(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.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new MoveResourceProperties(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.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal MoveResourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrorsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ExistingTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).TargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingResourceType = (string) content.GetValueForProperty("ResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingTargetResourceName = (string) content.GetValueForProperty("ResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingResourceType = (string) content.GetValueForProperty("SourceResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingTargetResourceName = (string) content.GetValueForProperty("SourceResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("MoveStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobProgress = (string) content.GetValueForProperty("MoveStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTargetId = (string) content.GetValueForProperty("MoveStatusTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorTarget = (string) content.GetValueForProperty("ErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMessage = (string) content.GetValueForProperty("MoveStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusCode = (string) content.GetValueForProperty("MoveStatusCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTarget = (string) content.GetValueForProperty("MoveStatusTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTarget, 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 MoveResourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrorsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ExistingTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).TargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingResourceType = (string) content.GetValueForProperty("ResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingTargetResourceName = (string) content.GetValueForProperty("ResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingResourceType = (string) content.GetValueForProperty("SourceResourceSettingResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingTargetResourceName = (string) content.GetValueForProperty("SourceResourceSettingTargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).SourceResourceSettingTargetResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("MoveStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobProgress = (string) content.GetValueForProperty("MoveStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTargetId = (string) content.GetValueForProperty("MoveStatusTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorTarget = (string) content.GetValueForProperty("ErrorTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMessage = (string) content.GetValueForProperty("MoveStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusCode = (string) content.GetValueForProperty("MoveStatusCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTarget = (string) content.GetValueForProperty("MoveStatusTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)this).MoveStatusTarget, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Defines the move resource properties. - [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesTypeConverter))] - public partial interface IMoveResourceProperties - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.PowerShell.cs deleted file mode 100644 index f06bddd4ae57..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.PowerShell.cs +++ /dev/null @@ -1,153 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Defines the move resource status. - [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesMoveStatusTypeConverter))] - public partial class MoveResourcePropertiesMoveStatus - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new MoveResourcePropertiesMoveStatus(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.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new MoveResourcePropertiesMoveStatus(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.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal MoveResourcePropertiesMoveStatus(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId, 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 MoveResourcePropertiesMoveStatus(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Defines the move resource status. - [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesMoveStatusTypeConverter))] - public partial interface IMoveResourcePropertiesMoveStatus - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.PowerShell.cs deleted file mode 100644 index 745cfd95a29b..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.PowerShell.cs +++ /dev/null @@ -1,153 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Defines the move resource status. - [System.ComponentModel.TypeConverter(typeof(MoveResourceStatusTypeConverter))] - public partial class MoveResourceStatus - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new MoveResourceStatus(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.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new MoveResourceStatus(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.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal MoveResourceStatus(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal MoveResourceStatus(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).TargetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Defines the move resource status. - [System.ComponentModel.TypeConverter(typeof(MoveResourceStatusTypeConverter))] - public partial interface IMoveResourceStatus - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.PowerShell.cs deleted file mode 100644 index cae082d2fdb2..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.PowerShell.cs +++ /dev/null @@ -1,147 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Defines NIC IP configuration properties. - [System.ComponentModel.TypeConverter(typeof(NicIPConfigurationResourceSettingsTypeConverter))] - public partial class NicIPConfigurationResourceSettings - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new NicIPConfigurationResourceSettings(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.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new NicIPConfigurationResourceSettings(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.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal NicIPConfigurationResourceSettings(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference[]) content.GetValueForProperty("LoadBalancerBackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerBackendAddressPoolReferenceTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Primary = (bool?) content.GetValueForProperty("Primary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Primary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetName, 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 NicIPConfigurationResourceSettings(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference[]) content.GetValueForProperty("LoadBalancerBackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerBackendAddressPoolReferenceTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Primary = (bool?) content.GetValueForProperty("Primary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).Primary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal)this).SubnetName, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Defines NIC IP configuration properties. - [System.ComponentModel.TypeConverter(typeof(NicIPConfigurationResourceSettingsTypeConverter))] - public partial interface INicIPConfigurationResourceSettings - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.PowerShell.cs deleted file mode 100644 index bcf194955134..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.PowerShell.cs +++ /dev/null @@ -1,153 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - - /// Operation status REST resource. - [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] - public partial class OperationStatus - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationStatus(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.ResourceMover.Models.Api20191001Preview.IOperationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationStatus(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.ResourceMover.Models.Api20191001Preview.IOperationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationStatus(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).EndTime = (string) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).EndTime, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).StartTime, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Status, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusErrorTypeConverter.ConvertFrom)); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationStatus(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusErrorTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).EndTime = (string) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).EndTime, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).StartTime, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Status, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusErrorTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Operation status REST resource. - [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] - public partial interface IOperationStatus - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.cs deleted file mode 100644 index 65a67336e4aa..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - - /// Class for operation result properties. - public partial class OperationStatusProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusPropertiesInternal - { - - /// Creates an new instance. - public OperationStatusProperties() - { - - } - } - /// Class for operation result properties. - public partial interface IOperationStatusProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable - { - - } - /// Class for operation result properties. - internal partial interface IOperationStatusPropertiesInternal - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.cs deleted file mode 100644 index 4e4e0bc90a35..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - - /// ClientDiscovery properties. - public partial class OperationsDiscoveryProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryPropertiesInternal - { - - /// Creates an new instance. - public OperationsDiscoveryProperties() - { - - } - } - /// ClientDiscovery properties. - public partial interface IOperationsDiscoveryProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable - { - - } - /// ClientDiscovery properties. - internal partial interface IOperationsDiscoveryPropertiesInternal - - { - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.cs deleted file mode 100644 index 10999f248557..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - - /// Defines the virtual network subnets resource settings. - public partial class SubnetResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal - { - - /// Backing field for property. - private string _addressPrefix; - - /// Gets or sets address prefix for the subnet. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string AddressPrefix { get => this._addressPrefix; set => this._addressPrefix = value; } - - /// Backing field for property. - private string _name; - - /// Gets or sets the Subnet name. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string Name { get => this._name; set => this._name = value; } - - /// Creates an new instance. - public SubnetResourceSettings() - { - - } - } - /// Defines the virtual network subnets resource settings. - public partial interface ISubnetResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable - { - /// Gets or sets address prefix for the subnet. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets or sets address prefix for the subnet.", - SerializedName = @"addressPrefix", - PossibleTypes = new [] { typeof(string) })] - string AddressPrefix { get; set; } - /// Gets or sets the Subnet name. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets or sets the Subnet name.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } - - } - /// Defines the virtual network subnets resource settings. - internal partial interface ISubnetResourceSettingsInternal - - { - /// Gets or sets address prefix for the subnet. - string AddressPrefix { get; set; } - /// Gets or sets the Subnet name. - string Name { get; set; } - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.cs b/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.cs deleted file mode 100644 index 37d86bfbdb0f..000000000000 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - - /// Unresolved dependency collection. - public partial class UnresolvedDependencyCollection : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal - { - - /// Backing field for property. - private string _nextLink; - - /// Gets or sets the value of next link. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency[] _value; - - /// Gets or sets the list of unresolved dependencies. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency[] Value { get => this._value; set => this._value = value; } - - /// Creates an new instance. - public UnresolvedDependencyCollection() - { - - } - } - /// Unresolved dependency collection. - public partial interface IUnresolvedDependencyCollection : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable - { - /// Gets or sets the value of next link. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets or sets the value of next link.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// Gets or sets the list of unresolved dependencies. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets or sets the list of unresolved dependencies.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency[] Value { get; set; } - - } - /// Unresolved dependency collection. - internal partial interface IUnresolvedDependencyCollectionInternal - - { - /// Gets or sets the value of next link. - string NextLink { get; set; } - /// Gets or sets the list of unresolved dependencies. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.PowerShell.cs similarity index 67% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.PowerShell.cs index 2c4bd3c5b04b..3fb9e64d4fd9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,7 +48,7 @@ public partial class AffectedMoveResource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -61,14 +61,14 @@ internal AffectedMoveResource(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResourceTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResourceTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -81,36 +81,34 @@ internal AffectedMoveResource(global::System.Management.Automation.PSObject cont return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResourceTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResourceTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AffectedMoveResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AffectedMoveResource(content); } @@ -120,7 +118,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.TypeConverter.cs index d3aca816c1f6..3ed8b534b766 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.cs b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.cs similarity index 80% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.cs rename to src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.cs index 76a8bf9d0c72..cd8b7ca8e5eb 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// The RP custom operation error info. public partial class AffectedMoveResource : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal { /// Backing field for property. @@ -16,20 +16,20 @@ public partial class AffectedMoveResource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for MoveResource - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal.MoveResource { get => this._moveResource; set { {_moveResource = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal.MoveResource { get => this._moveResource; set { {_moveResource = value;} } } /// Internal Acessors for SourceId - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResourceInternal.SourceId { get => this._sourceId; set { {_sourceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResourceInternal.SourceId { get => this._sourceId; set { {_sourceId = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] _moveResource; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] _moveResource; /// The affected move resources. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] MoveResource { get => this._moveResource; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] MoveResource { get => this._moveResource; } /// Backing field for property. private string _sourceId; @@ -62,8 +62,8 @@ public partial interface IAffectedMoveResource : ReadOnly = true, Description = @"The affected move resources.", SerializedName = @"moveResources", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] MoveResource { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] MoveResource { get; } /// The affected move resource source id. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -81,7 +81,7 @@ internal partial interface IAffectedMoveResourceInternal /// The affected move resource id. string Id { get; set; } /// The affected move resources. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] MoveResource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] MoveResource { get; set; } /// The affected move resource source id. string SourceId { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.json.cs b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.json.cs similarity index 92% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.json.cs index d093adc0354d..0aba31e31951 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AffectedMoveResource.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AffectedMoveResource.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -59,19 +59,19 @@ internal AffectedMoveResource(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.R return; } {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResource.FromJson(__u) )) ))() : null : MoveResource;} {_sourceId = If( json?.PropertyT("sourceId"), out var __jsonSourceId) ? (string)__jsonSourceId : (string)SourceId;} + {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResource.FromJson(__u) )) ))() : null : MoveResource;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new AffectedMoveResource(json) : null; } @@ -100,6 +100,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._moveResource) { @@ -111,10 +115,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To container.Add("moveResources",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); - } AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.PowerShell.cs similarity index 80% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.PowerShell.cs index 0a0aa09793f8..dcf74baedf79 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,7 +48,7 @@ public partial class AutomaticResolutionProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -61,12 +61,12 @@ internal AutomaticResolutionProperties(global::System.Collections.IDictionary co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionPropertiesInternal)this).MoveResourceId = (string) content.GetValueForProperty("MoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionPropertiesInternal)this).MoveResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionPropertiesInternal)this).MoveResourceId = (string) content.GetValueForProperty("MoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionPropertiesInternal)this).MoveResourceId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -79,34 +79,34 @@ internal AutomaticResolutionProperties(global::System.Management.Automation.PSOb return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionPropertiesInternal)this).MoveResourceId = (string) content.GetValueForProperty("MoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionPropertiesInternal)this).MoveResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionPropertiesInternal)this).MoveResourceId = (string) content.GetValueForProperty("MoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionPropertiesInternal)this).MoveResourceId, global::System.Convert.ToString); AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AutomaticResolutionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AutomaticResolutionProperties(content); } @@ -116,7 +116,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.TypeConverter.cs index 27ef366fcaef..a1f3c98e0153 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.cs b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.cs rename to src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.cs index fb0e9683d5b1..ad7436d21361 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the properties for automatic resolution. public partial class AutomaticResolutionProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionPropertiesInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.json.cs index 25e5eab204b4..e09d8d242966 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AutomaticResolutionProperties.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AutomaticResolutionProperties.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -63,13 +63,13 @@ internal AutomaticResolutionProperties(Microsoft.Azure.PowerShell.Cmdlets.Resour } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new AutomaticResolutionProperties(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.PowerShell.cs similarity index 67% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.PowerShell.cs index aea0a3b67097..d49dd0f95416 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,7 +48,7 @@ public partial class AvailabilitySetResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -61,15 +61,15 @@ internal AvailabilitySetResourceSettings(global::System.Collections.IDictionary return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).FaultDomain = (int?) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).FaultDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain = (int?) content.GetValueForProperty("UpdateDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).FaultDomain = (int?) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).FaultDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain = (int?) content.GetValueForProperty("UpdateDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,37 +82,37 @@ internal AvailabilitySetResourceSettings(global::System.Management.Automation.PS return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).FaultDomain = (int?) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).FaultDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain = (int?) content.GetValueForProperty("UpdateDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).FaultDomain = (int?) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).FaultDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain = (int?) content.GetValueForProperty("UpdateDomain",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal)this).UpdateDomain, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AvailabilitySetResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AvailabilitySetResourceSettings(content); } @@ -122,7 +122,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.TypeConverter.cs index d2c06deca60c..bbb61b5d60c0 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.cs similarity index 81% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.cs index 52fa6158da6a..dd8cb4f7f5a8 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.cs @@ -1,18 +1,18 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Gets or sets the availability set resource settings. public partial class AvailabilitySetResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// Backing field for property. private int? _faultDomain; @@ -25,11 +25,11 @@ public partial class AvailabilitySetResourceSettings : /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Backing field for property. private int? _updateDomain; @@ -59,7 +59,7 @@ public AvailabilitySetResourceSettings() /// Gets or sets the availability set resource settings. public partial interface IAvailabilitySetResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Gets or sets the target fault domain. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -81,7 +81,7 @@ public partial interface IAvailabilitySetResourceSettings : } /// Gets or sets the availability set resource settings. internal partial interface IAvailabilitySetResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Gets or sets the target fault domain. int? FaultDomain { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.json.cs index 98bb458a2754..c76b42b9b1bf 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AvailabilitySetResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AvailabilitySetResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -58,20 +58,20 @@ internal AvailabilitySetResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Reso { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); {_faultDomain = If( json?.PropertyT("faultDomain"), out var __jsonFaultDomain) ? (int?)__jsonFaultDomain : FaultDomain;} {_updateDomain = If( json?.PropertyT("updateDomain"), out var __jsonUpdateDomain) ? (int?)__jsonUpdateDomain : UpdateDomain;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAvailabilitySetResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAvailabilitySetResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new AvailabilitySetResourceSettings(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.PowerShell.cs similarity index 80% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.PowerShell.cs index 74ac8e5f0d02..07db84c122f9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,7 +48,7 @@ public partial class AzureResourceReference partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -61,12 +61,12 @@ internal AzureResourceReference(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -79,34 +79,32 @@ internal AzureResourceReference(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureResourceReference(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureResourceReference(content); } @@ -116,7 +114,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.TypeConverter.cs index 82f1102d579f..8e1b7df9e17e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.cs b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.cs rename to src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.cs index 4940f7ed37f3..2acb98e52478 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines reference to an Azure resource. public partial class AzureResourceReference : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.json.cs b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.json.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.json.cs index 9a4e51e3f2f4..020077530013 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/AzureResourceReference.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/AzureResourceReference.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -63,13 +63,13 @@ internal AzureResourceReference(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new AzureResourceReference(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.PowerShell.cs new file mode 100644 index 000000000000..495534eaf3cf --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.PowerShell.cs @@ -0,0 +1,135 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the request body for bulk remove of move resources operation. + [System.ComponentModel.TypeConverter(typeof(BulkRemoveRequestTypeConverter))] + public partial class BulkRemoveRequest + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal BulkRemoveRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal BulkRemoveRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); + 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.ResourceMover.Models.Api202101.IBulkRemoveRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BulkRemoveRequest(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.ResourceMover.Models.Api202101.IBulkRemoveRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BulkRemoveRequest(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.ResourceMover.Models.Api202101.IBulkRemoveRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the request body for bulk remove of move resources operation. + [System.ComponentModel.TypeConverter(typeof(BulkRemoveRequestTypeConverter))] + public partial interface IBulkRemoveRequest + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.TypeConverter.cs similarity index 84% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.TypeConverter.cs index c0a09b678adf..d8d761f120e2 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.TypeConverter.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class OperationsDiscoveryPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class BulkRemoveRequestTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -24,10 +24,10 @@ public partial class OperationsDiscoveryPropertiesTypeConverter : global::System /// Determines if the converter can convert the parameter to the /// parameter. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -89,7 +89,7 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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); @@ -97,24 +97,24 @@ public static bool CanConvertFrom(dynamic sourceValue) /// Converts the parameter to the parameter using and /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest).IsAssignableFrom(type)) { return sourceValue; } try { - return OperationsDiscoveryProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return BulkRemoveRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -122,11 +122,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return OperationsDiscoveryProperties.DeserializeFromPSObject(sourceValue); + return BulkRemoveRequest.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return OperationsDiscoveryProperties.DeserializeFromDictionary(sourceValue); + return BulkRemoveRequest.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.cs b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.cs new file mode 100644 index 000000000000..0db53f50d65b --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.cs @@ -0,0 +1,95 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the request body for bulk remove of move resources operation. + public partial class BulkRemoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequestInternal + { + + /// Backing field for property. + private string[] _moveResource; + + /// + /// Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via + /// moveResourceInputType property. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string[] MoveResource { get => this._moveResource; set => this._moveResource = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType? _moveResourceInputType; + + /// Defines the move resource input type. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType? MoveResourceInputType { get => this._moveResourceInputType; set => this._moveResourceInputType = value; } + + /// Backing field for property. + private bool? _validateOnly; + + /// + /// Gets or sets a value indicating whether the operation needs to only run pre-requisite. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public bool? ValidateOnly { get => this._validateOnly; set => this._validateOnly = value; } + + /// Creates an new instance. + public BulkRemoveRequest() + { + + } + } + /// Defines the request body for bulk remove of move resources operation. + public partial interface IBulkRemoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// + /// Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via + /// moveResourceInputType property. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.", + SerializedName = @"moveResources", + PossibleTypes = new [] { typeof(string) })] + string[] MoveResource { get; set; } + /// Defines the move resource input type. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the move resource input type.", + SerializedName = @"moveResourceInputType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType? MoveResourceInputType { get; set; } + /// + /// Gets or sets a value indicating whether the operation needs to only run pre-requisite. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets a value indicating whether the operation needs to only run pre-requisite.", + SerializedName = @"validateOnly", + PossibleTypes = new [] { typeof(bool) })] + bool? ValidateOnly { get; set; } + + } + /// Defines the request body for bulk remove of move resources operation. + internal partial interface IBulkRemoveRequestInternal + + { + /// + /// Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via + /// moveResourceInputType property. + /// + string[] MoveResource { get; set; } + /// Defines the move resource input type. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType? MoveResourceInputType { get; set; } + /// + /// Gets or sets a value indicating whether the operation needs to only run pre-requisite. + /// + bool? ValidateOnly { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.json.cs b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.json.cs new file mode 100644 index 000000000000..3a750959bc24 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/BulkRemoveRequest.json.cs @@ -0,0 +1,113 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the request body for bulk remove of move resources operation. + public partial class BulkRemoveRequest + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal BulkRemoveRequest(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_validateOnly = If( json?.PropertyT("validateOnly"), out var __jsonValidateOnly) ? (bool?)__jsonValidateOnly : ValidateOnly;} + {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} + {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new BulkRemoveRequest(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.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); + if (null != this._moveResource) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); + foreach( var __x in this._moveResource ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("moveResources",__w); + } + AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudError.PowerShell.cs similarity index 61% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudError.PowerShell.cs index 578fc27ef9f8..2fd5f7472ad9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudError.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,7 +48,7 @@ public partial class CloudError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -61,16 +61,16 @@ internal CloudError(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBodyTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -83,36 +83,36 @@ internal CloudError(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBodyTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CloudError(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CloudError(content); } @@ -122,7 +122,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudError.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudError.TypeConverter.cs index 63cd553e458d..de3108eeb31b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudError.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudError.cs similarity index 74% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudError.cs index d4b5d185e35f..1d0308de013e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudError.cs @@ -1,44 +1,44 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// An error response from the service. public partial class CloudError : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal { /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Code = value; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Code = value ?? null; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Detail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody _error; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody _error; /// Cloud error body. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBody()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBody()); set => this._error = value; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Message = value; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Message = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBody()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBody()); set { {_error = value;} } } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)Error).Target = value; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)Error).Target = value ?? null; } /// Creates an new instance. public CloudError() @@ -66,8 +66,8 @@ public partial interface ICloudError : ReadOnly = false, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -99,9 +99,9 @@ internal partial interface ICloudErrorInternal /// string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[] Detail { get; set; } /// Cloud error body. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody Error { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.json.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudError.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudError.json.cs index 89ee29cfa4f8..a409ed97da83 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudError.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudError.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -58,18 +58,18 @@ internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Jso { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBody.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBody.FromJson(__jsonError) : Error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new CloudError(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.PowerShell.cs similarity index 65% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.PowerShell.cs index 2988f3e79fd1..010cc49fd4ce 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,7 +48,7 @@ public partial class CloudErrorBody partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -61,15 +61,15 @@ internal CloudErrorBody(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBodyTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -82,37 +82,35 @@ internal CloudErrorBody(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBodyTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CloudErrorBody(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CloudErrorBody(content); } @@ -122,7 +120,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.TypeConverter.cs index 77fc32841578..d32ba24e9c41 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.cs similarity index 92% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.cs index fe90d9c68355..fa9414eeff53 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// An error response from the service. public partial class CloudErrorBody : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBodyInternal { /// Backing field for property. @@ -18,11 +18,11 @@ public partial class CloudErrorBody : public string Code { get => this._code; set => this._code = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[] _detail; /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[] Detail { get => this._detail; set => this._detail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[] Detail { get => this._detail; set => this._detail = value; } /// Backing field for property. private string _message; @@ -68,8 +68,8 @@ public partial interface ICloudErrorBody : ReadOnly = false, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -101,7 +101,7 @@ internal partial interface ICloudErrorBodyInternal /// string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.json.cs b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.json.cs similarity index 92% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.json.cs index ecb4955375ea..691af6405d6e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CloudErrorBody.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CloudErrorBody.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -61,18 +61,18 @@ internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new CloudErrorBody(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.PowerShell.cs similarity index 69% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/CommitRequest.PowerShell.cs index d526a3dc73ca..b1afd4e16269 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,7 +48,7 @@ public partial class CommitRequest partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -61,14 +61,14 @@ internal CommitRequest(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -81,34 +81,34 @@ internal CommitRequest(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CommitRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CommitRequest(content); } @@ -118,7 +118,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/CommitRequest.TypeConverter.cs index a59100a40ab7..ea5ecdf483ac 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.cs b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.cs similarity index 98% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.cs rename to src/ResourceMover/generated/api/Models/Api202101/CommitRequest.cs index 970225620b68..d72ba2cdb9c7 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the request body for commit operation. public partial class CommitRequest : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequestInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.json.cs b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.json.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/CommitRequest.json.cs index 60daef8f105e..96ac233cd1cd 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/CommitRequest.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/CommitRequest.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -58,20 +58,20 @@ internal CommitRequest(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime. { return; } - {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} - {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} {_validateOnly = If( json?.PropertyT("validateOnly"), out var __jsonValidateOnly) ? (bool?)__jsonValidateOnly : ValidateOnly;} + {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} + {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new CommitRequest(json) : null; } @@ -95,7 +95,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); + AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); if (null != this._moveResource) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -105,7 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("moveResources",__w); } - AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); + AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.PowerShell.cs similarity index 68% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.PowerShell.cs index bf5a4062da7e..f269f5452197 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,35 +48,33 @@ public partial class DiscardRequest partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiscardRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiscardRequest(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -89,14 +87,14 @@ internal DiscardRequest(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -109,9 +107,9 @@ internal DiscardRequest(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializePSObject(content); } @@ -120,7 +118,7 @@ internal DiscardRequest(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.TypeConverter.cs index fe65cb799286..384e1537322b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.cs b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.cs similarity index 98% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.cs rename to src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.cs index 22961051ad1b..be4150a3e9aa 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the request body for discard operation. public partial class DiscardRequest : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequestInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.json.cs b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.json.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.json.cs index 28692091096c..41072b06f4cc 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/DiscardRequest.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/DiscardRequest.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -58,20 +58,20 @@ internal DiscardRequest(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime { return; } - {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} - {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} {_validateOnly = If( json?.PropertyT("validateOnly"), out var __jsonValidateOnly) ? (bool?)__jsonValidateOnly : ValidateOnly;} + {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} + {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new DiscardRequest(json) : null; } @@ -95,7 +95,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); + AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); if (null != this._moveResource) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -105,7 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("moveResources",__w); } - AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); + AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.PowerShell.cs similarity index 64% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.PowerShell.cs index d34ab31135e8..da93417462e1 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.PowerShell.cs @@ -1,10 +1,10 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - /// Gets or sets the source resource settings. - [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesSourceResourceSettingsTypeConverter))] - public partial class MoveResourcePropertiesSourceResourceSettings + /// Defines the disk encryption set resource settings. + [System.ComponentModel.TypeConverter(typeof(DiskEncryptionSetResourceSettingsTypeConverter))] + public partial class DiskEncryptionSetResourceSettings { /// @@ -48,47 +48,39 @@ public partial class MoveResourcePropertiesSourceResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new MoveResourcePropertiesSourceResourceSettings(content); + return new DiskEncryptionSetResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new MoveResourcePropertiesSourceResourceSettings(content); + return new DiskEncryptionSetResourceSettings(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.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal MoveResourcePropertiesSourceResourceSettings(global::System.Collections.IDictionary content) + internal DiskEncryptionSetResourceSettings(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -97,17 +89,17 @@ internal MoveResourcePropertiesSourceResourceSettings(global::System.Collections return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal MoveResourcePropertiesSourceResourceSettings(global::System.Management.Automation.PSObject content) + internal DiskEncryptionSetResourceSettings(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -116,19 +108,26 @@ internal MoveResourcePropertiesSourceResourceSettings(global::System.Management. return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Gets or sets the source resource settings. - [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesSourceResourceSettingsTypeConverter))] - public partial interface IMoveResourcePropertiesSourceResourceSettings + /// Defines the disk encryption set resource settings. + [System.ComponentModel.TypeConverter(typeof(DiskEncryptionSetResourceSettingsTypeConverter))] + public partial interface IDiskEncryptionSetResourceSettings { diff --git a/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.TypeConverter.cs new file mode 100644 index 000000000000..cec609bac224 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DiskEncryptionSetResourceSettingsTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DiskEncryptionSetResourceSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DiskEncryptionSetResourceSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DiskEncryptionSetResourceSettings.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.cs similarity index 57% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.cs index f3c0fcbda0b3..4d92158368ad 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.cs @@ -1,33 +1,31 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - /// Gets or sets the source resource settings. - public partial class MoveResourcePropertiesSourceResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettingsInternal, + /// Defines the disk encryption set resource settings. + public partial class DiskEncryptionSetResourceSettings : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } - /// - /// Creates an new instance. - /// - public MoveResourcePropertiesSourceResourceSettings() + /// Creates an new instance. + public DiskEncryptionSetResourceSettings() { } @@ -44,16 +42,16 @@ public MoveResourcePropertiesSourceResourceSettings() await eventListener.AssertObjectIsValid(nameof(__resourceSettings), __resourceSettings); } } - /// Gets or sets the source resource settings. - public partial interface IMoveResourcePropertiesSourceResourceSettings : + /// Defines the disk encryption set resource settings. + public partial interface IDiskEncryptionSetResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { } - /// Gets or sets the source resource settings. - internal partial interface IMoveResourcePropertiesSourceResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + /// Defines the disk encryption set resource settings. + internal partial interface IDiskEncryptionSetResourceSettingsInternal : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.json.cs similarity index 81% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.json.cs index 844adf9a4d04..9d33c8693d2e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/DiskEncryptionSetResourceSettings.json.cs @@ -1,9 +1,9 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - /// Gets or sets the source resource settings. - public partial class MoveResourcePropertiesSourceResourceSettings + /// Defines the disk encryption set resource settings. + public partial class DiskEncryptionSetResourceSettings { /// @@ -47,23 +47,10 @@ public partial class MoveResourcePropertiesSourceResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourcePropertiesSourceResourceSettings(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. - internal MoveResourcePropertiesSourceResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + internal DiskEncryptionSetResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -71,20 +58,30 @@ internal MoveResourcePropertiesSourceResourceSettings(Microsoft.Azure.PowerShell { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiskEncryptionSetResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new DiskEncryptionSetResourceSettings(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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) { diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/Display.PowerShell.cs similarity index 72% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Display.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/Display.PowerShell.cs index 89bfdcc20361..ceefda6ac91d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Display.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -54,33 +54,33 @@ public partial class Display partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Display(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Display(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -93,15 +93,15 @@ internal Display(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Operation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Provider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Description, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -114,10 +114,10 @@ internal Display(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Operation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Provider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)this).Description, global::System.Convert.ToString); AfterDeserializePSObject(content); } @@ -126,7 +126,7 @@ internal Display(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/Display.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Display.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/Display.TypeConverter.cs index 03f09225410d..822c3948ddd7 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Display.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.cs b/src/ResourceMover/generated/api/Models/Api202101/Display.cs similarity index 99% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Display.cs rename to src/ResourceMover/generated/api/Models/Api202101/Display.cs index 74bfaea41397..8b4fee6d6909 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Display.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -10,8 +10,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Pre /// (3) audit history / records for management operations. /// public partial class Display : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.json.cs b/src/ResourceMover/generated/api/Models/Api202101/Display.json.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Display.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/Display.json.cs index f73ac0ee9fb9..e5fb46447622 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Display.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Display.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -64,21 +64,21 @@ internal Display(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.J { return; } - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new Display(json) : null; } @@ -102,10 +102,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/Identity.PowerShell.cs similarity index 72% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/Identity.PowerShell.cs index 97589d64b45a..60c3a6116ea6 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Identity.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,27 +48,27 @@ public partial class Identity partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Identity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Identity(content); } @@ -78,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -94,14 +94,14 @@ internal Identity(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).TenantId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -114,9 +114,9 @@ internal Identity(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)this).TenantId, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/Identity.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/Identity.TypeConverter.cs index 79d3398c337a..1390593fb757 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Identity.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.cs b/src/ResourceMover/generated/api/Models/Api202101/Identity.cs similarity index 89% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.cs rename to src/ResourceMover/generated/api/Models/Api202101/Identity.cs index 91d66449c14d..40698e943776 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Identity.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the MSI properties of the Move Collection. public partial class Identity : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal { /// Backing field for property. @@ -25,7 +25,7 @@ public partial class Identity : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? _type; - /// The type of identity used for the region move service. + /// The type of identity used for the resource mover service. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? Type { get => this._type; set => this._type = value; } @@ -55,11 +55,11 @@ public partial interface IIdentity : SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] string TenantId { get; set; } - /// The type of identity used for the region move service. + /// The type of identity used for the resource mover service. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The type of identity used for the region move service.", + Description = @"The type of identity used for the resource mover service.", SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType) })] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? Type { get; set; } @@ -73,7 +73,7 @@ internal partial interface IIdentityInternal string PrincipalId { get; set; } /// Gets or sets the tenant id. string TenantId { get; set; } - /// The type of identity used for the region move service. + /// The type of identity used for the resource mover service. Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? Type { get; set; } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.json.cs b/src/ResourceMover/generated/api/Models/Api202101/Identity.json.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/Identity.json.cs index 5c239ccd9ad3..ccb438c3de52 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/Identity.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/Identity.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class Identity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new Identity(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.PowerShell.cs similarity index 75% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/JobStatus.PowerShell.cs index 2d396c4a2273..c27e855a420b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,27 +48,27 @@ public partial class JobStatus partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new JobStatus(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new JobStatus(content); } @@ -78,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -94,13 +94,13 @@ internal JobStatus(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobProgress = (string) content.GetValueForProperty("JobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobProgress = (string) content.GetValueForProperty("JobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobProgress, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -113,8 +113,8 @@ internal JobStatus(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobProgress = (string) content.GetValueForProperty("JobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)this).JobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobProgress = (string) content.GetValueForProperty("JobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)this).JobProgress, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/JobStatus.TypeConverter.cs index d59fe52dab41..314b97be3c02 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.cs b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.cs similarity index 90% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.cs rename to src/ResourceMover/generated/api/Models/Api202101/JobStatus.cs index 93867acc53eb..ffe2cbfba36d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the job status. public partial class JobStatus : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal { /// Backing field for property. @@ -23,10 +23,10 @@ public partial class JobStatus : public string JobProgress { get => this._jobProgress; } /// Internal Acessors for JobName - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal.JobName { get => this._jobName; set { {_jobName = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal.JobName { get => this._jobName; set { {_jobName = value;} } } /// Internal Acessors for JobProgress - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal.JobProgress { get => this._jobProgress; set { {_jobProgress = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal.JobProgress { get => this._jobProgress; set { {_jobProgress = value;} } } /// Creates an new instance. public JobStatus() diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.json.cs b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.json.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/JobStatus.json.cs index 171988cd5191..7c9b7b7cb885 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/JobStatus.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/JobStatus.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class JobStatus partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new JobStatus(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.PowerShell.cs similarity index 67% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.PowerShell.cs index 20675c72a62f..d432107fbc80 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.PowerShell.cs @@ -1,10 +1,10 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - /// Defines the virtual network subnets resource settings. - [System.ComponentModel.TypeConverter(typeof(SubnetResourceSettingsTypeConverter))] - public partial class SubnetResourceSettings + /// Defines the key vault resource settings. + [System.ComponentModel.TypeConverter(typeof(KeyVaultResourceSettingsTypeConverter))] + public partial class KeyVaultResourceSettings { /// @@ -48,46 +48,46 @@ public partial class SubnetResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new SubnetResourceSettings(content); + return new KeyVaultResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new SubnetResourceSettings(content); + return new KeyVaultResourceSettings(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal SubnetResourceSettings(global::System.Collections.IDictionary content) + internal KeyVaultResourceSettings(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -96,17 +96,17 @@ internal SubnetResourceSettings(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).AddressPrefix = (string) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).AddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal SubnetResourceSettings(global::System.Management.Automation.PSObject content) + internal KeyVaultResourceSettings(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -115,8 +115,8 @@ internal SubnetResourceSettings(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).AddressPrefix = (string) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettingsInternal)this).AddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } @@ -125,9 +125,9 @@ internal SubnetResourceSettings(global::System.Management.Automation.PSObject co /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Defines the virtual network subnets resource settings. - [System.ComponentModel.TypeConverter(typeof(SubnetResourceSettingsTypeConverter))] - public partial interface ISubnetResourceSettings + /// Defines the key vault resource settings. + [System.ComponentModel.TypeConverter(typeof(KeyVaultResourceSettingsTypeConverter))] + public partial interface IKeyVaultResourceSettings { diff --git a/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.TypeConverter.cs new file mode 100644 index 000000000000..89fe56f67863 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KeyVaultResourceSettingsTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.IKeyVaultResourceSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KeyVaultResourceSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KeyVaultResourceSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KeyVaultResourceSettings.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.cs new file mode 100644 index 000000000000..ecc4d2072e42 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.cs @@ -0,0 +1,58 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the key vault resource settings. + public partial class KeyVaultResourceSettings : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); + + /// + /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } + + /// Gets or sets the target Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } + + /// Creates an new instance. + public KeyVaultResourceSettings() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceSettings), __resourceSettings); + await eventListener.AssertObjectIsValid(nameof(__resourceSettings), __resourceSettings); + } + } + /// Defines the key vault resource settings. + public partial interface IKeyVaultResourceSettings : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings + { + + } + /// Defines the key vault resource settings. + internal partial interface IKeyVaultResourceSettingsInternal : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.json.cs similarity index 83% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.json.cs index e3da7145a98f..33f7ca9b90d9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/KeyVaultResourceSettings.json.cs @@ -1,9 +1,9 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - /// ClientDiscovery properties. - public partial class OperationsDiscoveryProperties + /// Defines the key vault resource settings. + public partial class KeyVaultResourceSettings { /// @@ -47,22 +47,22 @@ public partial class OperationsDiscoveryProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IKeyVaultResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new OperationsDiscoveryProperties(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new KeyVaultResourceSettings(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. - internal OperationsDiscoveryProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + internal KeyVaultResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -70,17 +70,18 @@ internal OperationsDiscoveryProperties(Microsoft.Azure.PowerShell.Cmdlets.Resour { return; } + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) { @@ -92,6 +93,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } + __resourceSettings?.ToJson(container, serializationMode); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.PowerShell.cs similarity index 80% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.PowerShell.cs index 14ef5d6c3dc4..fa17ccce1f3a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class LbBackendAddressPoolResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new LbBackendAddressPoolResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new LbBackendAddressPoolResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,12 +96,12 @@ internal LbBackendAddressPoolResourceSettings(global::System.Collections.IDictio return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettingsInternal)this).Name, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -114,7 +114,7 @@ internal LbBackendAddressPoolResourceSettings(global::System.Management.Automati return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettingsInternal)this).Name, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.TypeConverter.cs index 7b968e4fa514..ff566f37cb04 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -103,14 +103,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.cs similarity index 92% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.cs index 63e7fb08b3d2..04e3a7de9c5c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines load balancer backend address pool properties. public partial class LbBackendAddressPoolResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettingsInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.json.cs index 29b868d14076..7139a10a3cdb 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbBackendAddressPoolResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbBackendAddressPoolResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class LbBackendAddressPoolResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new LbBackendAddressPoolResourceSettings(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.PowerShell.cs similarity index 55% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.PowerShell.cs index 5adecced698d..4cd453fc5b30 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class LbFrontendIpconfigurationResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new LbFrontendIpconfigurationResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new LbFrontendIpconfigurationResourceSettings(content); } @@ -81,10 +81,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -97,18 +97,18 @@ internal LbFrontendIpconfigurationResourceSettings(global::System.Collections.ID return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -121,13 +121,13 @@ internal LbFrontendIpconfigurationResourceSettings(global::System.Management.Aut return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).Zone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal)this).SubnetName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.TypeConverter.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.TypeConverter.cs index 6fd1fb4ece45..1bbe97ad05a4 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -104,14 +104,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.cs similarity index 83% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.cs index ae36ecd8e2e3..27967379e634 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.cs @@ -1,15 +1,15 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines load balancer frontend IP configuration properties. public partial class LbFrontendIpconfigurationResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal { /// Internal Acessors for Subnet - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettingsInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference()); set { {_subnet = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettingsInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference()); set { {_subnet = value;} } } /// Backing field for property. private string _name; @@ -36,19 +36,19 @@ public partial class LbFrontendIpconfigurationResourceSettings : public string PrivateIPAllocationMethod { get => this._privateIPAllocationMethod; set => this._privateIPAllocationMethod = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference _subnet; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference _subnet; - /// Defines reference to subnet. + /// Defines reference to a proxy resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference()); set => this._subnet = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference()); set => this._subnet = value; } /// Gets the name of the proxy resource on the target side. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SubnetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)Subnet).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)Subnet).Name = value; } + public string SubnetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)Subnet).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)Subnet).Name = value ?? null; } /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SubnetSourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId = value; } + public string SubnetSourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId = value ?? null; } /// Backing field for property. private string _zone; @@ -107,7 +107,7 @@ public partial interface ILbFrontendIpconfigurationResourceSettings : string SubnetName { get; set; } /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, Description = @"Gets the ARM resource ID of the tracked resource being referenced.", SerializedName = @"sourceArmResourceId", @@ -136,8 +136,8 @@ internal partial interface ILbFrontendIpconfigurationResourceSettingsInternal string PrivateIPAddress { get; set; } /// Gets or sets PrivateIP allocation method (Static/Dynamic). string PrivateIPAllocationMethod { get; set; } - /// Defines reference to subnet. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference Subnet { get; set; } + /// Defines reference to a proxy resource. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference Subnet { get; set; } /// Gets the name of the proxy resource on the target side. string SubnetName { get; set; } /// Gets the ARM resource ID of the tracked resource being referenced. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.json.cs index a880eee1f2c9..9de063981cd9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LbFrontendIpconfigurationResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LbFrontendIpconfigurationResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class LbFrontendIpconfigurationResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new LbFrontendIpconfigurationResourceSettings(json) : null; } @@ -70,7 +70,7 @@ internal LbFrontendIpconfigurationResourceSettings(Microsoft.Azure.PowerShell.Cm { return; } - {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference.FromJson(__jsonSubnet) : Subnet;} + {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference.FromJson(__jsonSubnet) : Subnet;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_privateIPAddress = If( json?.PropertyT("privateIpAddress"), out var __jsonPrivateIPAddress) ? (string)__jsonPrivateIPAddress : (string)PrivateIPAddress;} {_privateIPAllocationMethod = If( json?.PropertyT("privateIpAllocationMethod"), out var __jsonPrivateIPAllocationMethod) ? (string)__jsonPrivateIPAllocationMethod : (string)PrivateIPAllocationMethod;} diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.PowerShell.cs similarity index 75% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.PowerShell.cs index a7ad9ea9731f..4579bb95877b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class LoadBalancerBackendAddressPoolReference partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new LoadBalancerBackendAddressPoolReference(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new LoadBalancerBackendAddressPoolReference(content); } @@ -81,10 +81,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -97,13 +97,13 @@ internal LoadBalancerBackendAddressPoolReference(global::System.Collections.IDic return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -116,8 +116,8 @@ internal LoadBalancerBackendAddressPoolReference(global::System.Management.Autom return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.TypeConverter.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.TypeConverter.cs index ab1f18d84d5d..29299192ded6 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -104,14 +104,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.cs similarity index 72% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.cs index 7b252e1ff929..7f5fe71a763a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.cs @@ -1,26 +1,26 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines reference to load balancer backend address pools. public partial class LoadBalancerBackendAddressPoolReference : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReferenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReferenceInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference(); /// Gets the name of the proxy resource on the target side. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)__proxyResourceReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)__proxyResourceReference).Name = value; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)__proxyResourceReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)__proxyResourceReference).Name = value ?? null; } /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId = value; } + public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId = value ; } /// Creates an new instance. public LoadBalancerBackendAddressPoolReference() @@ -43,13 +43,13 @@ public LoadBalancerBackendAddressPoolReference() /// Defines reference to load balancer backend address pools. public partial interface ILoadBalancerBackendAddressPoolReference : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference { } /// Defines reference to load balancer backend address pools. internal partial interface ILoadBalancerBackendAddressPoolReferenceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.json.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.json.cs index a9923f9073b8..5fd073f9233b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerBackendAddressPoolReference.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerBackendAddressPoolReference.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class LoadBalancerBackendAddressPoolReference partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerBackendAddressPoolReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new LoadBalancerBackendAddressPoolReference(json) : null; } @@ -70,7 +70,7 @@ internal LoadBalancerBackendAddressPoolReference(Microsoft.Azure.PowerShell.Cmdl { return; } - __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference(json); + __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference(json); AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.PowerShell.cs similarity index 75% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.PowerShell.cs index e372a1206bfd..6d9afc082826 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class LoadBalancerNatRuleReference partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new LoadBalancerNatRuleReference(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new LoadBalancerNatRuleReference(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +96,13 @@ internal LoadBalancerNatRuleReference(global::System.Collections.IDictionary con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +115,8 @@ internal LoadBalancerNatRuleReference(global::System.Management.Automation.PSObj return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.TypeConverter.cs index ea950204dab1..dfba99578df7 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.cs similarity index 71% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.cs index 46b170dd4098..4c500a6d303a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.cs @@ -1,26 +1,26 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines reference to load balancer NAT rules. public partial class LoadBalancerNatRuleReference : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReferenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReferenceInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference(); /// Gets the name of the proxy resource on the target side. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)__proxyResourceReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)__proxyResourceReference).Name = value; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)__proxyResourceReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)__proxyResourceReference).Name = value ?? null; } /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId = value; } + public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId = value ; } /// Creates an new instance. public LoadBalancerNatRuleReference() @@ -43,13 +43,13 @@ public LoadBalancerNatRuleReference() /// Defines reference to load balancer NAT rules. public partial interface ILoadBalancerNatRuleReference : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference { } /// Defines reference to load balancer NAT rules. internal partial interface ILoadBalancerNatRuleReferenceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.json.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.json.cs index 9d5e0a022470..e42c86e2b039 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerNatRuleReference.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerNatRuleReference.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class LoadBalancerNatRuleReference partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerNatRuleReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerNatRuleReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new LoadBalancerNatRuleReference(json) : null; } @@ -70,7 +70,7 @@ internal LoadBalancerNatRuleReference(Microsoft.Azure.PowerShell.Cmdlets.Resourc { return; } - __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference(json); + __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference(json); AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.PowerShell.cs similarity index 54% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.PowerShell.cs index 343bdf9639ef..a0f3f3da538d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class LoadBalancerResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new LoadBalancerResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new LoadBalancerResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,17 +96,17 @@ internal LoadBalancerResourceSettings(global::System.Collections.IDictionary con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings[]) content.GetValueForProperty("BackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbBackendAddressPoolResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings[]) content.GetValueForProperty("FrontendIPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbFrontendIpconfigurationResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Sku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Zone, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Sku, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings[]) content.GetValueForProperty("FrontendIPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbFrontendIpconfigurationResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings[]) content.GetValueForProperty("BackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbBackendAddressPoolResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Zone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -119,12 +119,12 @@ internal LoadBalancerResourceSettings(global::System.Management.Automation.PSObj return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings[]) content.GetValueForProperty("BackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbBackendAddressPoolResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings[]) content.GetValueForProperty("FrontendIPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbFrontendIpconfigurationResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Sku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal)this).Zone, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Sku, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings[]) content.GetValueForProperty("FrontendIPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).FrontendIPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbFrontendIpconfigurationResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings[]) content.GetValueForProperty("BackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).BackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbBackendAddressPoolResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal)this).Zone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.TypeConverter.cs index b31ea0717acb..2d6974be53e3 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.cs similarity index 77% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.cs index 9924e2ac8436..4cf7244cf370 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.cs @@ -1,38 +1,38 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the load balancer resource settings. public partial class LoadBalancerResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings[] _backendAddressPool; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings[] _backendAddressPool; /// Gets or sets the backend address pools of the load balancer. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings[] BackendAddressPool { get => this._backendAddressPool; set => this._backendAddressPool = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings[] BackendAddressPool { get => this._backendAddressPool; set => this._backendAddressPool = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings[] _frontendIPConfiguration; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings[] _frontendIPConfiguration; /// Gets or sets the frontend IP configurations of the load balancer. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings[] FrontendIPConfiguration { get => this._frontendIPConfiguration; set => this._frontendIPConfiguration = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings[] FrontendIPConfiguration { get => this._frontendIPConfiguration; set => this._frontendIPConfiguration = value; } /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Backing field for property. private string _sku; @@ -43,7 +43,7 @@ public partial class LoadBalancerResourceSettings : /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Backing field for property. private string _zone; @@ -76,7 +76,7 @@ public LoadBalancerResourceSettings() /// Defines the load balancer resource settings. public partial interface ILoadBalancerResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Gets or sets the backend address pools of the load balancer. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -84,16 +84,16 @@ public partial interface ILoadBalancerResourceSettings : ReadOnly = false, Description = @"Gets or sets the backend address pools of the load balancer.", SerializedName = @"backendAddressPools", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings[] BackendAddressPool { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings[] BackendAddressPool { get; set; } /// Gets or sets the frontend IP configurations of the load balancer. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, Description = @"Gets or sets the frontend IP configurations of the load balancer.", SerializedName = @"frontendIPConfigurations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings[] FrontendIPConfiguration { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings[] FrontendIPConfiguration { get; set; } /// Gets or sets load balancer sku (Basic/Standard). [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -118,12 +118,12 @@ public partial interface ILoadBalancerResourceSettings : } /// Defines the load balancer resource settings. internal partial interface ILoadBalancerResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Gets or sets the backend address pools of the load balancer. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings[] BackendAddressPool { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings[] BackendAddressPool { get; set; } /// Gets or sets the frontend IP configurations of the load balancer. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings[] FrontendIPConfiguration { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings[] FrontendIPConfiguration { get; set; } /// Gets or sets load balancer sku (Basic/Standard). string Sku { get; set; } /// diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.json.cs similarity index 83% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.json.cs index 2b29656458c9..da696d1fc4b8 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/LoadBalancerResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/LoadBalancerResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class LoadBalancerResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILoadBalancerResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new LoadBalancerResourceSettings(json) : null; } @@ -70,10 +70,10 @@ internal LoadBalancerResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Resourc { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); - {_backendAddressPool = If( json?.PropertyT("backendAddressPools"), out var __jsonBackendAddressPools) ? If( __jsonBackendAddressPools as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbBackendAddressPoolResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbBackendAddressPoolResourceSettings.FromJson(__u) )) ))() : null : BackendAddressPool;} - {_frontendIPConfiguration = If( json?.PropertyT("frontendIPConfigurations"), out var __jsonFrontendIPConfigurations) ? If( __jsonFrontendIPConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILbFrontendIpconfigurationResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LbFrontendIpconfigurationResourceSettings.FromJson(__p) )) ))() : null : FrontendIPConfiguration;} + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku;} + {_frontendIPConfiguration = If( json?.PropertyT("frontendIPConfigurations"), out var __jsonFrontendIPConfigurations) ? If( __jsonFrontendIPConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbFrontendIpconfigurationResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbFrontendIpconfigurationResourceSettings.FromJson(__u) )) ))() : null : FrontendIPConfiguration;} + {_backendAddressPool = If( json?.PropertyT("backendAddressPools"), out var __jsonBackendAddressPools) ? If( __jsonBackendAddressPools as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ILbBackendAddressPoolResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.LbBackendAddressPoolResourceSettings.FromJson(__p) )) ))() : null : BackendAddressPool;} {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? (string)__jsonZones : (string)Zone;} AfterFromJson(json); } @@ -98,25 +98,25 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } __resourceSettings?.ToJson(container, serializationMode); - if (null != this._backendAddressPool) + AddIf( null != (((object)this._sku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sku.ToString()) : null, "sku" ,container.Add ); + if (null != this._frontendIPConfiguration) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); - foreach( var __x in this._backendAddressPool ) + foreach( var __x in this._frontendIPConfiguration ) { AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); } - container.Add("backendAddressPools",__w); + container.Add("frontendIPConfigurations",__w); } - if (null != this._frontendIPConfiguration) + if (null != this._backendAddressPool) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); - foreach( var __s in this._frontendIPConfiguration ) + foreach( var __s in this._backendAddressPool ) { AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); } - container.Add("frontendIPConfigurations",__r); + container.Add("backendAddressPools",__r); } - AddIf( null != (((object)this._sku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sku.ToString()) : null, "sku" ,container.Add ); AddIf( null != (((object)this._zone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._zone.ToString()) : null, "zones" ,container.Add ); AfterToJson(ref container); return container; diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.PowerShell.cs similarity index 81% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.PowerShell.cs index 3d75307296d7..95e33ec91aab 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class ManualResolutionProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManualResolutionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManualResolutionProperties(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,12 +96,12 @@ internal ManualResolutionProperties(global::System.Collections.IDictionary conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionPropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionPropertiesInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionPropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionPropertiesInternal)this).TargetId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -114,7 +114,7 @@ internal ManualResolutionProperties(global::System.Management.Automation.PSObjec return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionPropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionPropertiesInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionPropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionPropertiesInternal)this).TargetId, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.TypeConverter.cs index 060dede39477..557007f73a3e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.cs b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.cs rename to src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.cs index 7a1c0605032e..84db233d48aa 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the properties for manual resolution. public partial class ManualResolutionProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionPropertiesInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.json.cs index 8cf2623b4c7d..d48788fddc4f 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ManualResolutionProperties.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ManualResolutionProperties.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class ManualResolutionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new ManualResolutionProperties(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.PowerShell.cs new file mode 100644 index 000000000000..9ddece66a12e --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.PowerShell.cs @@ -0,0 +1,169 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Define the move collection. + [System.ComponentModel.TypeConverter(typeof(MoveCollectionTypeConverter))] + public partial class MoveCollection + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MoveCollection(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.ResourceMover.Models.Api202101.IMoveCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MoveCollection(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.ResourceMover.Models.Api202101.IMoveCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MoveCollection(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Etag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).SourceRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).TargetRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MoveCollection(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Etag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).SourceRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).TargetRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Define the move collection. + [System.ComponentModel.TypeConverter(typeof(MoveCollectionTypeConverter))] + public partial interface IMoveCollection + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollection.TypeConverter.cs index 3dec0ab35ef5..f7cfe5e779e1 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.cs new file mode 100644 index 000000000000..ab897679fb4f --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.cs @@ -0,0 +1,350 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Define the move collection. + public partial class MoveCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal + { + + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Code; } + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Detail; } + + /// Backing field for property. + private string _etag; + + /// The etag of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string Etag { get => this._etag; } + + /// Backing field for property. + private string _id; + + /// Fully qualified resource Id for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity _identity; + + /// Defines the MSI properties of the Move Collection. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity()); set => this._identity = value; } + + /// Gets or sets the principal id. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).PrincipalId = value ?? null; } + + /// Gets or sets the tenant id. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).TenantId = value ?? null; } + + /// The type of identity used for the resource mover service. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType)""); } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Message; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Error = value; } + + /// Internal Acessors for ErrorProperty + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).ErrorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).ErrorProperty = value; } + + /// Internal Acessors for Etag + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Etag { get => this._etag; set { {_etag = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity()); set { {_identity = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Message = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Target = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties _property; + + /// Defines the move collection properties. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionProperties()); set => this._property = value; } + + /// Defines the provisioning states. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).ProvisioningState; } + + /// Gets or sets the source region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string SourceRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).SourceRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).SourceRegion = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTags()); set => this._tag = value; } + + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).Target; } + + /// Gets or sets the target region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string TargetRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).TargetRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)Property).TargetRegion = value ?? null; } + + /// Backing field for property. + private string _type; + + /// The type of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public MoveCollection() + { + + } + } + /// Define the move collection. + public partial interface IMoveCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; } + /// The etag of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The etag of the resource.", + SerializedName = @"etag", + PossibleTypes = new [] { typeof(string) })] + string Etag { get; } + /// Fully qualified resource Id for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Fully qualified resource Id for the resource.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// Gets or sets the principal id. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the principal id.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; set; } + /// Gets or sets the tenant id. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the tenant id.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string IdentityTenantId { get; set; } + /// The type of identity used for the resource mover service. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity used for the resource mover service.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } + /// The geo-location where the resource lives. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The geo-location where the resource lives.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Defines the provisioning states. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Defines the provisioning states.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; } + /// Gets or sets the source region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the source region.", + SerializedName = @"sourceRegion", + PossibleTypes = new [] { typeof(string) })] + string SourceRegion { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags Tag { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The target of the particular error. For example, the name of the property in error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + /// Gets or sets the target region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the target region.", + SerializedName = @"targetRegion", + PossibleTypes = new [] { typeof(string) })] + string TargetRegion { get; set; } + /// The type of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of the resource.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Define the move collection. + internal partial interface IMoveCollectionInternal + + { + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + string Code { get; set; } + /// A list of additional details about the error. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; set; } + /// Defines the move collection errors. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get; set; } + /// The move resource error body. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody ErrorProperty { get; set; } + /// The etag of the resource. + string Etag { get; set; } + /// Fully qualified resource Id for the resource. + string Id { get; set; } + /// Defines the MSI properties of the Move Collection. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity Identity { get; set; } + /// Gets or sets the principal id. + string IdentityPrincipalId { get; set; } + /// Gets or sets the tenant id. + string IdentityTenantId { get; set; } + /// The type of identity used for the resource mover service. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } + /// The geo-location where the resource lives. + string Location { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + string Message { get; set; } + /// The name of the resource + string Name { get; set; } + /// Defines the move collection properties. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties Property { get; set; } + /// Defines the provisioning states. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; set; } + /// Gets or sets the source region. + string SourceRegion { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags Tag { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + string Target { get; set; } + /// Gets or sets the target region. + string TargetRegion { get; set; } + /// The type of the resource. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.json.cs similarity index 89% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollection.json.cs index 933fc7085183..5fbecfab5022 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollection.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollection.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveCollection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveCollection(json) : null; } @@ -70,13 +70,14 @@ internal MoveCollection(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime { return; } - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity.FromJson(__jsonIdentity) : Identity;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionProperties.FromJson(__jsonProperties) : Property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity.FromJson(__jsonIdentity) : Identity;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionProperties.FromJson(__jsonProperties) : Property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTags.FromJson(__jsonTags) : Tag;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } @@ -102,6 +103,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } @@ -111,10 +116,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag" ,container.Add ); } - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.PowerShell.cs new file mode 100644 index 000000000000..f1374615d9b0 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.PowerShell.cs @@ -0,0 +1,149 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the move collection properties. + [System.ComponentModel.TypeConverter(typeof(MoveCollectionPropertiesTypeConverter))] + public partial class MoveCollectionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MoveCollectionProperties(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.ResourceMover.Models.Api202101.IMoveCollectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MoveCollectionProperties(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.ResourceMover.Models.Api202101.IMoveCollectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MoveCollectionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).SourceRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).TargetRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MoveCollectionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).SourceRegion = (string) content.GetValueForProperty("SourceRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).SourceRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).TargetRegion = (string) content.GetValueForProperty("TargetRegion",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).TargetRegion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the move collection properties. + [System.ComponentModel.TypeConverter(typeof(MoveCollectionPropertiesTypeConverter))] + public partial interface IMoveCollectionProperties + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.TypeConverter.cs index 73fdea1b5f20..b15e44503c83 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.cs new file mode 100644 index 000000000000..b0bd8b026a52 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.cs @@ -0,0 +1,186 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the move collection properties. + public partial class MoveCollectionProperties : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal + { + + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code; } + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError _error; + + /// Defines the move collection errors. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError()); } + + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError()); set { {_error = value;} } } + + /// Internal Acessors for ErrorProperty + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal.ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Property = value; } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? _provisioningState; + + /// Defines the provisioning states. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _sourceRegion; + + /// Gets or sets the source region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string SourceRegion { get => this._sourceRegion; set => this._sourceRegion = value; } + + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target; } + + /// Backing field for property. + private string _targetRegion; + + /// Gets or sets the target region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string TargetRegion { get => this._targetRegion; set => this._targetRegion = value; } + + /// Creates an new instance. + public MoveCollectionProperties() + { + + } + } + /// Defines the move collection properties. + public partial interface IMoveCollectionProperties : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Defines the provisioning states. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Defines the provisioning states.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; } + /// Gets or sets the source region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Gets or sets the source region.", + SerializedName = @"sourceRegion", + PossibleTypes = new [] { typeof(string) })] + string SourceRegion { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The target of the particular error. For example, the name of the property in error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + /// Gets or sets the target region. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Gets or sets the target region.", + SerializedName = @"targetRegion", + PossibleTypes = new [] { typeof(string) })] + string TargetRegion { get; set; } + + } + /// Defines the move collection properties. + internal partial interface IMoveCollectionPropertiesInternal + + { + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + string Code { get; set; } + /// A list of additional details about the error. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; set; } + /// Defines the move collection errors. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get; set; } + /// The move resource error body. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody ErrorProperty { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + string Message { get; set; } + /// Defines the provisioning states. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; set; } + /// Gets or sets the source region. + string SourceRegion { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + string Target { get; set; } + /// Gets or sets the target region. + string TargetRegion { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.json.cs similarity index 90% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.json.cs index cf4626b21170..d8b6ae6b6abd 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionProperties.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionProperties.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveCollectionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveCollectionProperties(json) : null; } @@ -70,9 +70,10 @@ internal MoveCollectionProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceMov { return; } - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError.FromJson(__jsonErrors) : Error;} {_sourceRegion = If( json?.PropertyT("sourceRegion"), out var __jsonSourceRegion) ? (string)__jsonSourceRegion : (string)SourceRegion;} {_targetRegion = If( json?.PropertyT("targetRegion"), out var __jsonTargetRegion) ? (string)__jsonTargetRegion : (string)TargetRegion;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); } @@ -97,10 +98,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "errors" ,container.Add ); } AddIf( null != (((object)this._sourceRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sourceRegion.ToString()) : null, "sourceRegion" ,container.Add ); AddIf( null != (((object)this._targetRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetRegion.ToString()) : null, "targetRegion" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.PowerShell.cs new file mode 100644 index 000000000000..4120cd24fd0c --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.PowerShell.cs @@ -0,0 +1,141 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the move collection errors. + [System.ComponentModel.TypeConverter(typeof(MoveCollectionPropertiesErrorsTypeConverter))] + public partial class MoveCollectionPropertiesErrors + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MoveCollectionPropertiesErrors(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.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MoveCollectionPropertiesErrors(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.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MoveCollectionPropertiesErrors(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MoveCollectionPropertiesErrors(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the move collection errors. + [System.ComponentModel.TypeConverter(typeof(MoveCollectionPropertiesErrorsTypeConverter))] + public partial interface IMoveCollectionPropertiesErrors + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.TypeConverter.cs new file mode 100644 index 000000000000..bec7b8bfa88c --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MoveCollectionPropertiesErrorsTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MoveCollectionPropertiesErrors.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MoveCollectionPropertiesErrors.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MoveCollectionPropertiesErrors.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.cs new file mode 100644 index 000000000000..7ad5b4fbda78 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.cs @@ -0,0 +1,86 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the move collection errors. + public partial class MoveCollectionPropertiesErrors : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrorsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError __moveResourceError = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError(); + + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Code; } + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Detail; } + + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Message; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Detail = value; } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Target = value; } + + /// The move resource error body. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Property = value ?? null /* model class */; } + + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Target; } + + /// Creates an new instance. + public MoveCollectionPropertiesErrors() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__moveResourceError), __moveResourceError); + await eventListener.AssertObjectIsValid(nameof(__moveResourceError), __moveResourceError); + } + } + /// Defines the move collection errors. + public partial interface IMoveCollectionPropertiesErrors : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError + { + + } + /// Defines the move collection errors. + internal partial interface IMoveCollectionPropertiesErrorsInternal : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.json.cs new file mode 100644 index 000000000000..15d2909d955d --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionPropertiesErrors.json.cs @@ -0,0 +1,101 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the move collection errors. + public partial class MoveCollectionPropertiesErrors + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionPropertiesErrors FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveCollectionPropertiesErrors(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal MoveCollectionPropertiesErrors(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __moveResourceError = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __moveResourceError?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.PowerShell.cs similarity index 71% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.PowerShell.cs index 143c3107e4e1..a2957b0b86f3 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class MoveCollectionResultList partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveCollectionResultList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveCollectionResultList(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +96,13 @@ internal MoveCollectionResultList(global::System.Collections.IDictionary content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).NextLink, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +115,8 @@ internal MoveCollectionResultList(global::System.Management.Automation.PSObject return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal)this).NextLink, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.TypeConverter.cs index 282b31f29c7e..163dd8706305 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.cs similarity index 85% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.cs index db09aec0481c..37f0224f086b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the collection of move collections. public partial class MoveCollectionResultList : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultListInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultListInternal { /// Backing field for property. @@ -16,11 +16,11 @@ public partial class MoveCollectionResultList : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection[] _value; /// Gets the list of move collections. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public MoveCollectionResultList() @@ -46,8 +46,8 @@ public partial interface IMoveCollectionResultList : ReadOnly = false, Description = @"Gets the list of move collections.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection[] Value { get; set; } } /// Defines the collection of move collections. @@ -57,7 +57,7 @@ internal partial interface IMoveCollectionResultListInternal /// Gets the value of next link. string NextLink { get; set; } /// Gets the list of move collections. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection[] Value { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.json.cs similarity index 91% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.json.cs index 70baad82f003..19d30755520b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionResultList.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionResultList.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveCollectionResultList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionResultList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionResultList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveCollectionResultList(json) : null; } @@ -70,8 +70,8 @@ internal MoveCollectionResultList(Microsoft.Azure.PowerShell.Cmdlets.ResourceMov { return; } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection.FromJson(__u) )) ))() : null : Value;} AfterFromJson(json); } @@ -94,7 +94,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -104,6 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("value",__w); } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.PowerShell.cs similarity index 87% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.PowerShell.cs index 372c5713435f..da7eca421d7b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class MoveCollectionTags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveCollectionTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveCollectionTags(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -102,7 +100,7 @@ internal MoveCollectionTags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.TypeConverter.cs index 45a292e7d4df..6887eb8fd4be 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.cs similarity index 89% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.cs index 49a9bde8336e..5a64635989c4 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Resource tags. public partial class MoveCollectionTags : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTagsInternal { /// Creates an new instance. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.dictionary.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.dictionary.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.dictionary.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.dictionary.cs index 7ccb26bd1c77..e4d1babfaa6b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.dictionary.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.dictionary.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -65,6 +65,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.json.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.json.cs index 5c81678e54c4..3d964cec482d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveCollectionTags.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveCollectionTags.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveCollectionTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveCollectionTags(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.PowerShell.cs similarity index 75% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.PowerShell.cs index 0d01ed9c4316..cc1a8589e93b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,27 +48,27 @@ public partial class MoveErrorInfo partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveErrorInfo(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveErrorInfo(content); } @@ -78,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -94,12 +94,12 @@ internal MoveErrorInfo(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResourceTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -112,7 +112,7 @@ internal MoveErrorInfo(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal)this).MoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResourceTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.TypeConverter.cs index 88ae0e9638d9..1089aefa155c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.cs similarity index 73% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.cs index 8c91f2063687..119f7fde3ff5 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.cs @@ -1,22 +1,22 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// The move custom error info. public partial class MoveErrorInfo : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal { /// Internal Acessors for MoveResource - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal.MoveResource { get => this._moveResource; set { {_moveResource = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal.MoveResource { get => this._moveResource; set { {_moveResource = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] _moveResource; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] _moveResource; /// The affected move resources. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] MoveResource { get => this._moveResource; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] MoveResource { get => this._moveResource; } /// Creates an new instance. public MoveErrorInfo() @@ -34,8 +34,8 @@ public partial interface IMoveErrorInfo : ReadOnly = true, Description = @"The affected move resources.", SerializedName = @"moveResources", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] MoveResource { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] MoveResource { get; } } /// The move custom error info. @@ -43,7 +43,7 @@ internal partial interface IMoveErrorInfoInternal { /// The affected move resources. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] MoveResource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] MoveResource { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.json.cs similarity index 91% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.json.cs index b64a1986e3c5..06ac408789ca 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveErrorInfo.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveErrorInfo.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveErrorInfo partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveErrorInfo(json) : null; } @@ -70,7 +70,7 @@ internal MoveErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime. { return; } - {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResource.FromJson(__u) )) ))() : null : MoveResource;} + {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResource.FromJson(__u) )) ))() : null : MoveResource;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveResource.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.PowerShell.cs new file mode 100644 index 000000000000..3506eb018f71 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.PowerShell.cs @@ -0,0 +1,189 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the move resource. + [System.ComponentModel.TypeConverter(typeof(MoveResourceTypeConverter))] + public partial class MoveResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MoveResource(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.ResourceMover.Models.Api202101.IMoveResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MoveResource(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.ResourceMover.Models.Api202101.IMoveResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MoveResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ExistingTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).IsResolveRequired = (bool?) content.GetValueForProperty("IsResolveRequired",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).IsResolveRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesCode = (string) content.GetValueForProperty("ErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesMessage = (string) content.GetValueForProperty("ErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesTarget = (string) content.GetValueForProperty("ErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesCode = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesMessage = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesTarget = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MoveResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ExistingTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).IsResolveRequired = (bool?) content.GetValueForProperty("IsResolveRequired",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).IsResolveRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesCode = (string) content.GetValueForProperty("ErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesMessage = (string) content.GetValueForProperty("ErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesTarget = (string) content.GetValueForProperty("ErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).ErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesCode = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesMessage = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesTarget = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal)this).MoveStatusErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the move resource. + [System.ComponentModel.TypeConverter(typeof(MoveResourceTypeConverter))] + public partial interface IMoveResource + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResource.TypeConverter.cs index 2bfee73c3fa4..60f68cbb82df 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.cs similarity index 53% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResource.cs index 5c04acc13f44..50ecee1cde9e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.cs @@ -1,47 +1,47 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the move resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.DoNotFormat] public partial class MoveResource : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal { /// Gets or sets the move resource dependencies. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] DependsOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).DependsOn; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] DependsOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).DependsOn; } /// Gets or sets the move resource dependencies overrides. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] DependsOnOverride { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).DependsOnOverride; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).DependsOnOverride = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] DependsOnOverride { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).DependsOnOverride; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).DependsOnOverride = value ?? null /* arrayOf */; } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorCode; } + public string ErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesCode; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] ErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorDetail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] ErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesDetail; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorMessage; } + public string ErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesMessage; } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorTarget; } + public string ErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesTarget; } /// Gets or sets the existing target ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ExistingTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ExistingTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ExistingTargetId = value; } + public string ExistingTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ExistingTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ExistingTargetId = value ?? null; } /// Backing field for property. private string _id; @@ -50,124 +50,123 @@ public partial class MoveResource : [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] public string Id { get => this._id; } + /// + /// Gets a value indicating whether the resolve action is required over the move collection. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public bool? IsResolveRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).IsResolveRequired; } + + /// Defines the job name. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).JobStatusJobName; } + + /// Gets or sets the monitoring job percentage. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).JobStatusJobProgress; } + /// Internal Acessors for DependsOn - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.DependsOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).DependsOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).DependsOn = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.DependsOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).DependsOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).DependsOn = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).Error = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).Error = value; } - /// Internal Acessors for ErrorCode - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorCode = value; } + /// Internal Acessors for ErrorsPropertiesCode + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.ErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesCode = value; } - /// Internal Acessors for ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.ErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorDetail = value; } + /// Internal Acessors for ErrorsPropertiesDetail + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.ErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesDetail = value; } - /// Internal Acessors for ErrorMessage - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorMessage = value; } + /// Internal Acessors for ErrorsPropertiesMessage + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.ErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesMessage = value; } - /// Internal Acessors for ErrorProperty - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorProperty = value; } + /// Internal Acessors for ErrorsPropertiesTarget + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.ErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsPropertiesTarget = value; } - /// Internal Acessors for ErrorTarget - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.ErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ErrorTarget = value; } + /// Internal Acessors for ErrorsProperty + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.ErrorsProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ErrorsProperty = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.Id { get => this._id; set { {_id = value;} } } - /// Internal Acessors for MoveStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatus = value; } + /// Internal Acessors for IsResolveRequired + bool? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.IsResolveRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).IsResolveRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).IsResolveRequired = value; } - /// Internal Acessors for MoveStatusCode - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusCode = value; } + /// Internal Acessors for JobStatusJobName + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).JobStatusJobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).JobStatusJobName = value; } - /// Internal Acessors for MoveStatusDetail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusDetail = value; } + /// Internal Acessors for JobStatusJobProgress + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).JobStatusJobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).JobStatusJobProgress = value; } - /// Internal Acessors for MoveStatusError - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusError; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusError = value; } + /// Internal Acessors for MoveStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatus = value; } - /// Internal Acessors for MoveStatusErrorProperty - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusErrorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusErrorProperty = value; } + /// Internal Acessors for MoveStatusError + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusError; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusError = value; } - /// Internal Acessors for MoveStatusJobName - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobName = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesCode + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesCode = value; } - /// Internal Acessors for MoveStatusJobProgress - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobProgress = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesDetail + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesDetail = value; } - /// Internal Acessors for MoveStatusJobStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusJobStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobStatus = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesMessage + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesMessage = value; } - /// Internal Acessors for MoveStatusMessage - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusMessage = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesTarget + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesTarget = value; } - /// Internal Acessors for MoveStatusMoveState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusMoveState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusMoveState = value; } + /// Internal Acessors for MoveStatusErrorsProperty + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusErrorsProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsProperty = value; } - /// Internal Acessors for MoveStatusTarget - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusTarget = value; } + /// Internal Acessors for MoveStatusJobStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusJobStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusJobStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusJobStatus = value; } - /// Internal Acessors for MoveStatusTargetId - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.MoveStatusTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusTargetId = value; } + /// Internal Acessors for MoveStatusMoveState + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusMoveState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusMoveState = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for ResourceSetting - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.ResourceSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ResourceSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ResourceSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for SourceResourceSetting - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.SourceResourceSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceResourceSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceResourceSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.SourceResourceSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).SourceResourceSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).SourceResourceSetting = value; } /// Internal Acessors for TargetId - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).TargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).TargetId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).TargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).TargetId = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceInternal.Type { get => this._type; set { {_type = value;} } } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusCode; } + public string MoveStatusErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesCode; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] MoveStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusDetail; } - - /// Defines the job name. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? MoveStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobName; } - - /// Gets or sets the monitoring job percentage. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusJobProgress; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] MoveStatusErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesDetail; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusMessage; } - - /// Defines the MoveResource states. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusMoveState; } + public string MoveStatusErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesMessage; } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusTarget; } + public string MoveStatusErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusErrorsPropertiesTarget; } - /// Gets the Target ARM Id of the resource. + /// Defines the MoveResource states. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).MoveStatusTargetId; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).MoveStatusMoveState; } /// Backing field for property. private string _name; @@ -177,43 +176,31 @@ public partial class MoveResource : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties _property; /// Defines the move resource properties. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceProperties()); set => this._property = value; } /// Defines the provisioning states. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ProvisioningState; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ResourceSettingResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ResourceSettingResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ResourceSettingResourceType = value; } - - /// Gets or sets the target Resource name. + /// Gets or sets the resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ResourceSettingTargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ResourceSettingTargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).ResourceSettingTargetResourceName = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ResourceSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ResourceSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).ResourceSetting = value ?? null /* model class */; } /// Gets or sets the Source ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceId = value; } - - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SourceResourceSettingResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceResourceSettingResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceResourceSettingResourceType = value; } + public string SourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).SourceId = value ?? null; } - /// Gets or sets the target Resource name. + /// Gets or sets the source resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SourceResourceSettingTargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceResourceSettingTargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).SourceResourceSettingTargetResourceName = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings SourceResourceSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).SourceResourceSetting; } /// Gets or sets the Target ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal)Property).TargetId; } + public string TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)Property).TargetId; } /// Backing field for property. private string _type; @@ -238,16 +225,16 @@ public partial interface IMoveResource : ReadOnly = true, Description = @"Gets or sets the move resource dependencies.", SerializedName = @"dependsOn", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] DependsOn { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] DependsOn { get; } /// Gets or sets the move resource dependencies overrides. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, Description = @"Gets or sets the move resource dependencies overrides.", SerializedName = @"dependsOnOverrides", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// @@ -257,15 +244,15 @@ public partial interface IMoveResource : Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] - string ErrorCode { get; } + string ErrorsPropertiesCode { get; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] ErrorDetail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] ErrorsPropertiesDetail { get; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -275,7 +262,7 @@ public partial interface IMoveResource : Description = @"A message describing the error, intended to be suitable for display in a user interface.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] - string ErrorMessage { get; } + string ErrorsPropertiesMessage { get; } /// /// The target of the particular error. For example, the name of the property in error. /// @@ -285,7 +272,7 @@ public partial interface IMoveResource : Description = @"The target of the particular error. For example, the name of the property in error.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] - string ErrorTarget { get; } + string ErrorsPropertiesTarget { get; } /// Gets or sets the existing target ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -303,23 +290,15 @@ public partial interface IMoveResource : PossibleTypes = new [] { typeof(string) })] string Id { get; } /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// Gets a value indicating whether the resolve action is required over the move collection. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string MoveStatusCode { get; } - /// A list of additional details about the error. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of additional details about the error.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] MoveStatusDetail { get; } + Description = @"Gets a value indicating whether the resolve action is required over the move collection.", + SerializedName = @"isResolveRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsResolveRequired { get; } /// Defines the job name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -327,7 +306,7 @@ public partial interface IMoveResource : Description = @"Defines the job name.", SerializedName = @"jobName", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? MoveStatusJobName { get; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get; } /// Gets or sets the monitoring job percentage. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -335,25 +314,35 @@ public partial interface IMoveResource : Description = @"Gets or sets the monitoring job percentage.", SerializedName = @"jobProgress", PossibleTypes = new [] { typeof(string) })] - string MoveStatusJobProgress { get; } + string JobStatusJobProgress { get; } /// - /// A message describing the error, intended to be suitable for display in a user interface. + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"A message describing the error, intended to be suitable for display in a user interface.", - SerializedName = @"message", + Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", + SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] - string MoveStatusMessage { get; } - /// Defines the MoveResource states. + string MoveStatusErrorsPropertiesCode { get; } + /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Defines the MoveResource states.", - SerializedName = @"moveState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; } + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] MoveStatusErrorsPropertiesDetail { get; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string MoveStatusErrorsPropertiesMessage { get; } /// /// The target of the particular error. For example, the name of the property in error. /// @@ -363,15 +352,15 @@ public partial interface IMoveResource : Description = @"The target of the particular error. For example, the name of the property in error.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] - string MoveStatusTarget { get; } - /// Gets the Target ARM Id of the resource. + string MoveStatusErrorsPropertiesTarget { get; } + /// Defines the MoveResource states. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Gets the Target ARM Id of the resource.", - SerializedName = @"targetId", - PossibleTypes = new [] { typeof(string) })] - string MoveStatusTargetId { get; } + Description = @"Defines the MoveResource states.", + SerializedName = @"moveState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -388,50 +377,30 @@ public partial interface IMoveResource : SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState) })] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The resource type. For example, the value can be Microsoft.Compute/virtualMachines.", - SerializedName = @"resourceType", - PossibleTypes = new [] { typeof(string) })] - string ResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. + /// Gets or sets the resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, - Description = @"Gets or sets the target Resource name.", - SerializedName = @"targetResourceName", - PossibleTypes = new [] { typeof(string) })] - string ResourceSettingTargetResourceName { get; set; } + Description = @"Gets or sets the resource settings.", + SerializedName = @"resourceSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ResourceSetting { get; set; } /// Gets or sets the Source ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, Description = @"Gets or sets the Source ARM Id of the resource.", SerializedName = @"sourceId", PossibleTypes = new [] { typeof(string) })] string SourceId { get; set; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The resource type. For example, the value can be Microsoft.Compute/virtualMachines.", - SerializedName = @"resourceType", - PossibleTypes = new [] { typeof(string) })] - string SourceResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. + /// Gets or sets the source resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Gets or sets the target Resource name.", - SerializedName = @"targetResourceName", - PossibleTypes = new [] { typeof(string) })] - string SourceResourceSettingTargetResourceName { get; set; } + Required = false, + ReadOnly = true, + Description = @"Gets or sets the source resource settings.", + SerializedName = @"sourceResourceSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings SourceResourceSetting { get; } /// Gets or sets the Target ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -455,85 +424,75 @@ internal partial interface IMoveResourceInternal { /// Gets or sets the move resource dependencies. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] DependsOn { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] DependsOn { get; set; } /// Gets or sets the move resource dependencies overrides. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } /// Defines the move resource errors. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get; set; } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// - string ErrorCode { get; set; } + string ErrorsPropertiesCode { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] ErrorDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] ErrorsPropertiesDetail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// - string ErrorMessage { get; set; } - /// The move resource error body. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody ErrorProperty { get; set; } + string ErrorsPropertiesMessage { get; set; } /// /// The target of the particular error. For example, the name of the property in error. /// - string ErrorTarget { get; set; } + string ErrorsPropertiesTarget { get; set; } + /// The move resource error body. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody ErrorsProperty { get; set; } /// Gets or sets the existing target ARM Id of the resource. string ExistingTargetId { get; set; } /// Fully qualified resource Id for the resource. string Id { get; set; } + /// + /// Gets a value indicating whether the resolve action is required over the move collection. + /// + bool? IsResolveRequired { get; set; } + /// Defines the job name. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get; set; } + /// Gets or sets the monitoring job percentage. + string JobStatusJobProgress { get; set; } /// Defines the move resource status. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus MoveStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus MoveStatus { get; set; } + /// An error response from the azure resource mover service. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError MoveStatusError { get; set; } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// - string MoveStatusCode { get; set; } + string MoveStatusErrorsPropertiesCode { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] MoveStatusDetail { get; set; } - /// An error response from the azure region move service. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError MoveStatusError { get; set; } - /// The move resource error body. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody MoveStatusErrorProperty { get; set; } - /// Defines the job name. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? MoveStatusJobName { get; set; } - /// Gets or sets the monitoring job percentage. - string MoveStatusJobProgress { get; set; } - /// Defines the job status. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus MoveStatusJobStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] MoveStatusErrorsPropertiesDetail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// - string MoveStatusMessage { get; set; } - /// Defines the MoveResource states. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; set; } + string MoveStatusErrorsPropertiesMessage { get; set; } /// /// The target of the particular error. For example, the name of the property in error. /// - string MoveStatusTarget { get; set; } - /// Gets the Target ARM Id of the resource. - string MoveStatusTargetId { get; set; } + string MoveStatusErrorsPropertiesTarget { get; set; } + /// The move resource error body. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody MoveStatusErrorsProperty { get; set; } + /// Defines the job status. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus MoveStatusJobStatus { get; set; } + /// Defines the MoveResource states. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; set; } /// The name of the resource string Name { get; set; } /// Defines the move resource properties. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties Property { get; set; } /// Defines the provisioning states. Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; set; } /// Gets or sets the resource settings. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings ResourceSetting { get; set; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - string ResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. - string ResourceSettingTargetResourceName { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ResourceSetting { get; set; } /// Gets or sets the Source ARM Id of the resource. string SourceId { get; set; } /// Gets or sets the source resource settings. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings SourceResourceSetting { get; set; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - string SourceResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. - string SourceResourceSettingTargetResourceName { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings SourceResourceSetting { get; set; } /// Gets or sets the Target ARM Id of the resource. string TargetId { get; set; } /// The type of the resource. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResource.json.cs index a11dd8e684fb..bad396b35b5a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResource.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResource.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResource(json) : null; } @@ -70,10 +70,10 @@ internal MoveResource(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.J { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceProperties.FromJson(__jsonProperties) : Property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} AfterFromJson(json); } @@ -99,15 +99,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } AfterToJson(ref container); return container; diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.PowerShell.cs similarity index 51% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.PowerShell.cs index 0ea5f493f60e..afd7753829a9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class MoveResourceCollection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourceCollection(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourceCollection(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +94,17 @@ internal MoveResourceCollection(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollection = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection) content.GetValueForProperty("SummaryCollection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollection, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollectionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).TotalCount = (long?) content.GetValueForProperty("TotalCount",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).TotalCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionFieldName = (string) content.GetValueForProperty("SummaryCollectionFieldName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionFieldName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionSummary = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[]) content.GetValueForProperty("SummaryCollectionSummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +117,12 @@ internal MoveResourceCollection(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollection = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection) content.GetValueForProperty("SummaryCollection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollection, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollectionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).TotalCount = (long?) content.GetValueForProperty("TotalCount",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).TotalCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionFieldName = (string) content.GetValueForProperty("SummaryCollectionFieldName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionFieldName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionSummary = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[]) content.GetValueForProperty("SummaryCollectionSummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal)this).SummaryCollectionSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.TypeConverter.cs index 0aaacad17ef6..63d665e02aa3 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.cs new file mode 100644 index 000000000000..1c8d0c986a4a --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.cs @@ -0,0 +1,123 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the collection of move resources. + public partial class MoveResourceCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal + { + + /// Internal Acessors for SummaryCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal.SummaryCollection { get => (this._summaryCollection = this._summaryCollection ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection()); set { {_summaryCollection = value;} } } + + /// Internal Acessors for TotalCount + long? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollectionInternal.TotalCount { get => this._totalCount; set { {_totalCount = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// Gets the value of next link. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection _summaryCollection; + + /// Gets or sets the list of summary items and the field on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection SummaryCollection { get => (this._summaryCollection = this._summaryCollection ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection()); set => this._summaryCollection = value; } + + /// Gets or sets the field name on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string SummaryCollectionFieldName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).FieldName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).FieldName = value ?? null; } + + /// Gets or sets the list of summary items. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] SummaryCollectionSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).Summary = value ?? null /* arrayOf */; } + + /// Backing field for property. + private long? _totalCount; + + /// Gets the total count. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public long? TotalCount { get => this._totalCount; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource[] _value; + + /// Gets the list of move resources. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public MoveResourceCollection() + { + + } + } + /// Defines the collection of move resources. + public partial interface IMoveResourceCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// Gets the value of next link. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the value of next link.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// Gets or sets the field name on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the field name on which summary is done.", + SerializedName = @"fieldName", + PossibleTypes = new [] { typeof(string) })] + string SummaryCollectionFieldName { get; set; } + /// Gets or sets the list of summary items. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the list of summary items.", + SerializedName = @"summary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] SummaryCollectionSummary { get; set; } + /// Gets the total count. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Gets the total count.", + SerializedName = @"totalCount", + PossibleTypes = new [] { typeof(long) })] + long? TotalCount { get; } + /// Gets the list of move resources. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the list of move resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource[] Value { get; set; } + + } + /// Defines the collection of move resources. + internal partial interface IMoveResourceCollectionInternal + + { + /// Gets the value of next link. + string NextLink { get; set; } + /// Gets or sets the list of summary items and the field on which summary is done. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection SummaryCollection { get; set; } + /// Gets or sets the field name on which summary is done. + string SummaryCollectionFieldName { get; set; } + /// Gets or sets the list of summary items. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] SummaryCollectionSummary { get; set; } + /// Gets the total count. + long? TotalCount { get; set; } + /// Gets the list of move resources. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.json.cs similarity index 80% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.json.cs index 1d711afa2834..5147171db602 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceCollection.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceCollection.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourceCollection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceCollection(json) : null; } @@ -70,8 +70,10 @@ internal MoveResourceCollection(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover { return; } + {_summaryCollection = If( json?.PropertyT("summaryCollection"), out var __jsonSummaryCollection) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection.FromJson(__jsonSummaryCollection) : SummaryCollection;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResource.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResource.FromJson(__u) )) ))() : null : Value;} + {_totalCount = If( json?.PropertyT("totalCount"), out var __jsonTotalCount) ? (long?)__jsonTotalCount : TotalCount;} AfterFromJson(json); } @@ -94,7 +96,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AddIf( null != this._summaryCollection ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._summaryCollection.ToJson(null,serializationMode) : null, "summaryCollection" ,container.Add ); if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -104,6 +106,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("value",__w); } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._totalCount ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNumber((long)this._totalCount) : null, "totalCount" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.PowerShell.cs similarity index 50% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.PowerShell.cs index 5c50d0cc3e99..1cc25b695e5e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class MoveResourceDependency partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourceDependency(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourceDependency(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,20 +94,20 @@ internal MoveResourceDependency(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties) content.GetValueForProperty("AutomaticResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AutomaticResolutionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties) content.GetValueForProperty("ManualResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ManualResolutionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).DependencyType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType?) content.GetValueForProperty("DependencyType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).DependencyType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).IsOptional = (string) content.GetValueForProperty("IsOptional",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).IsOptional, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionStatus = (string) content.GetValueForProperty("ResolutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionStatus, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType?) content.GetValueForProperty("ResolutionType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId = (string) content.GetValueForProperty("AutomaticResolutionMoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolutionTargetId = (string) content.GetValueForProperty("ManualResolutionTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolutionTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties) content.GetValueForProperty("ManualResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ManualResolutionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties) content.GetValueForProperty("AutomaticResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AutomaticResolutionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionStatus = (string) content.GetValueForProperty("ResolutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionStatus, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType?) content.GetValueForProperty("ResolutionType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).DependencyType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType?) content.GetValueForProperty("DependencyType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).DependencyType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).IsOptional = (string) content.GetValueForProperty("IsOptional",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).IsOptional, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolutionTargetId = (string) content.GetValueForProperty("ManualResolutionTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolutionTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId = (string) content.GetValueForProperty("AutomaticResolutionMoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -122,15 +120,15 @@ internal MoveResourceDependency(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties) content.GetValueForProperty("AutomaticResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AutomaticResolutionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties) content.GetValueForProperty("ManualResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ManualResolutionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).DependencyType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType?) content.GetValueForProperty("DependencyType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).DependencyType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).IsOptional = (string) content.GetValueForProperty("IsOptional",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).IsOptional, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionStatus = (string) content.GetValueForProperty("ResolutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionStatus, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType?) content.GetValueForProperty("ResolutionType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ResolutionType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId = (string) content.GetValueForProperty("AutomaticResolutionMoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolutionTargetId = (string) content.GetValueForProperty("ManualResolutionTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal)this).ManualResolutionTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties) content.GetValueForProperty("ManualResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ManualResolutionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolution = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties) content.GetValueForProperty("AutomaticResolution",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolution, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AutomaticResolutionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionStatus = (string) content.GetValueForProperty("ResolutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionStatus, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType?) content.GetValueForProperty("ResolutionType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ResolutionType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).DependencyType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType?) content.GetValueForProperty("DependencyType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).DependencyType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).IsOptional = (string) content.GetValueForProperty("IsOptional",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).IsOptional, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolutionTargetId = (string) content.GetValueForProperty("ManualResolutionTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).ManualResolutionTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId = (string) content.GetValueForProperty("AutomaticResolutionMoveResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal)this).AutomaticResolutionMoveResourceId, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.TypeConverter.cs index 43db461a36f6..19333d4fffc6 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.cs similarity index 81% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.cs index acf7d073a7e3..b877093a6e13 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.cs @@ -1,26 +1,26 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the dependency of the move resource. public partial class MoveResourceDependency : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties _automaticResolution; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties _automaticResolution; /// Defines the properties for automatic resolution. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties AutomaticResolution { get => (this._automaticResolution = this._automaticResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AutomaticResolutionProperties()); set => this._automaticResolution = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties AutomaticResolution { get => (this._automaticResolution = this._automaticResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AutomaticResolutionProperties()); set => this._automaticResolution = value; } /// /// Gets the MoveResource ARM ID of /// the dependent resource if the resolution type is Automatic. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string AutomaticResolutionMoveResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionPropertiesInternal)AutomaticResolution).MoveResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionPropertiesInternal)AutomaticResolution).MoveResourceId = value; } + public string AutomaticResolutionMoveResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionPropertiesInternal)AutomaticResolution).MoveResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionPropertiesInternal)AutomaticResolution).MoveResourceId = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyType? _dependencyType; @@ -44,23 +44,23 @@ public partial class MoveResourceDependency : public string IsOptional { get => this._isOptional; set => this._isOptional = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties _manualResolution; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties _manualResolution; /// Defines the properties for manual resolution. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties ManualResolution { get => (this._manualResolution = this._manualResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ManualResolutionProperties()); set => this._manualResolution = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties ManualResolution { get => (this._manualResolution = this._manualResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ManualResolutionProperties()); set => this._manualResolution = value; } /// /// Gets or sets the target resource ARM ID of the dependent resource if the resource type is Manual. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ManualResolutionTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionPropertiesInternal)ManualResolution).TargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionPropertiesInternal)ManualResolution).TargetId = value; } + public string ManualResolutionTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionPropertiesInternal)ManualResolution).TargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionPropertiesInternal)ManualResolution).TargetId = value ?? null; } /// Internal Acessors for AutomaticResolution - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal.AutomaticResolution { get => (this._automaticResolution = this._automaticResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AutomaticResolutionProperties()); set { {_automaticResolution = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal.AutomaticResolution { get => (this._automaticResolution = this._automaticResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AutomaticResolutionProperties()); set { {_automaticResolution = value;} } } /// Internal Acessors for ManualResolution - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyInternal.ManualResolution { get => (this._manualResolution = this._manualResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ManualResolutionProperties()); set { {_manualResolution = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyInternal.ManualResolution { get => (this._manualResolution = this._manualResolution ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ManualResolutionProperties()); set { {_manualResolution = value;} } } /// Backing field for property. private string _resolutionStatus; @@ -155,7 +155,7 @@ internal partial interface IMoveResourceDependencyInternal { /// Defines the properties for automatic resolution. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAutomaticResolutionProperties AutomaticResolution { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAutomaticResolutionProperties AutomaticResolution { get; set; } /// /// Gets the MoveResource ARM ID of /// the dependent resource if the resolution type is Automatic. @@ -168,7 +168,7 @@ internal partial interface IMoveResourceDependencyInternal /// Gets or sets a value indicating whether the dependency is optional. string IsOptional { get; set; } /// Defines the properties for manual resolution. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IManualResolutionProperties ManualResolution { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IManualResolutionProperties ManualResolution { get; set; } /// /// Gets or sets the target resource ARM ID of the dependent resource if the resource type is Manual. /// diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.json.cs index 7481e518e22d..3a048c9fd6c8 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependency.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependency.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourceDependency partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceDependency(json) : null; } @@ -70,13 +70,13 @@ internal MoveResourceDependency(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover { return; } - {_automaticResolution = If( json?.PropertyT("automaticResolution"), out var __jsonAutomaticResolution) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AutomaticResolutionProperties.FromJson(__jsonAutomaticResolution) : AutomaticResolution;} - {_manualResolution = If( json?.PropertyT("manualResolution"), out var __jsonManualResolution) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ManualResolutionProperties.FromJson(__jsonManualResolution) : ManualResolution;} - {_dependencyType = If( json?.PropertyT("dependencyType"), out var __jsonDependencyType) ? (string)__jsonDependencyType : (string)DependencyType;} + {_manualResolution = If( json?.PropertyT("manualResolution"), out var __jsonManualResolution) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ManualResolutionProperties.FromJson(__jsonManualResolution) : ManualResolution;} + {_automaticResolution = If( json?.PropertyT("automaticResolution"), out var __jsonAutomaticResolution) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AutomaticResolutionProperties.FromJson(__jsonAutomaticResolution) : AutomaticResolution;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_isOptional = If( json?.PropertyT("isOptional"), out var __jsonIsOptional) ? (string)__jsonIsOptional : (string)IsOptional;} {_resolutionStatus = If( json?.PropertyT("resolutionStatus"), out var __jsonResolutionStatus) ? (string)__jsonResolutionStatus : (string)ResolutionStatus;} {_resolutionType = If( json?.PropertyT("resolutionType"), out var __jsonResolutionType) ? (string)__jsonResolutionType : (string)ResolutionType;} + {_dependencyType = If( json?.PropertyT("dependencyType"), out var __jsonDependencyType) ? (string)__jsonDependencyType : (string)DependencyType;} + {_isOptional = If( json?.PropertyT("isOptional"), out var __jsonIsOptional) ? (string)__jsonIsOptional : (string)IsOptional;} AfterFromJson(json); } @@ -99,13 +99,13 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != this._automaticResolution ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._automaticResolution.ToJson(null,serializationMode) : null, "automaticResolution" ,container.Add ); AddIf( null != this._manualResolution ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._manualResolution.ToJson(null,serializationMode) : null, "manualResolution" ,container.Add ); - AddIf( null != (((object)this._dependencyType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._dependencyType.ToString()) : null, "dependencyType" ,container.Add ); + AddIf( null != this._automaticResolution ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._automaticResolution.ToJson(null,serializationMode) : null, "automaticResolution" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - AddIf( null != (((object)this._isOptional)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._isOptional.ToString()) : null, "isOptional" ,container.Add ); AddIf( null != (((object)this._resolutionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._resolutionStatus.ToString()) : null, "resolutionStatus" ,container.Add ); AddIf( null != (((object)this._resolutionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._resolutionType.ToString()) : null, "resolutionType" ,container.Add ); + AddIf( null != (((object)this._dependencyType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._dependencyType.ToString()) : null, "dependencyType" ,container.Add ); + AddIf( null != (((object)this._isOptional)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._isOptional.ToString()) : null, "isOptional" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.PowerShell.cs similarity index 76% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.PowerShell.cs index cbcac1ddc3a0..0f4481f8e10e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class MoveResourceDependencyOverride partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourceDependencyOverride(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourceDependencyOverride(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +96,13 @@ internal MoveResourceDependencyOverride(global::System.Collections.IDictionary c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).TargetId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +115,8 @@ internal MoveResourceDependencyOverride(global::System.Management.Automation.PSO return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal)this).TargetId, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.TypeConverter.cs index 9d62a01700a1..0f4af854afb7 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.cs index d4cb91c04850..8a14a7504360 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the dependency override of the move resource. public partial class MoveResourceDependencyOverride : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverrideInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverrideInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.json.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.json.cs index 66ee7811c317..acec84f26c35 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceDependencyOverride.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceDependencyOverride.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourceDependencyOverride partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceDependencyOverride(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.PowerShell.cs similarity index 59% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.PowerShell.cs index 02cf6e1a5cd4..4da6391ddb5d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.PowerShell.cs @@ -1,8 +1,8 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. [System.ComponentModel.TypeConverter(typeof(MoveResourceErrorTypeConverter))] public partial class MoveResourceError { @@ -48,29 +48,27 @@ public partial class MoveResourceError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourceError(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourceError(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,16 +94,16 @@ internal MoveResourceError(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,11 +116,11 @@ internal MoveResourceError(global::System.Management.Automation.PSObject content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } @@ -131,7 +129,7 @@ internal MoveResourceError(global::System.Management.Automation.PSObject content /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. [System.ComponentModel.TypeConverter(typeof(MoveResourceErrorTypeConverter))] public partial interface IMoveResourceError diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.TypeConverter.cs index 0ea9551c67b6..ed0315f5a8be 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.cs similarity index 64% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.cs index ba8d0c0c65f4..e1e7e4db3e6c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.cs @@ -1,56 +1,56 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. public partial class MoveResourceError : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal { /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Code; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Detail; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Detail = value; } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Message = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBody()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBody()); set { {_property = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Target = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody _property; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody _property; /// The move resource error body. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBody()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBody()); set => this._property = value; } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)Property).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)Property).Target; } /// Creates an new instance. public MoveResourceError() @@ -58,7 +58,7 @@ public MoveResourceError() } } - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. public partial interface IMoveResourceError : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable { @@ -78,8 +78,8 @@ public partial interface IMoveResourceError : ReadOnly = true, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -102,7 +102,7 @@ public partial interface IMoveResourceError : string Target { get; } } - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. internal partial interface IMoveResourceErrorInternal { @@ -111,13 +111,13 @@ internal partial interface IMoveResourceErrorInternal /// string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// string Message { get; set; } /// The move resource error body. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Property { get; set; } /// /// The target of the particular error. For example, the name of the property in error. /// diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.json.cs similarity index 93% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.json.cs index 8cba3fdb98a0..493164f16460 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceError.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceError.json.cs @@ -1,8 +1,8 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. public partial class MoveResourceError { @@ -47,13 +47,13 @@ public partial class MoveResourceError partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceError(json) : null; } @@ -70,7 +70,7 @@ internal MoveResourceError(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runt { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBody.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBody.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.PowerShell.cs similarity index 64% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.PowerShell.cs index 67cebd9c5b59..da818f47d8e5 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class MoveResourceErrorBody partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourceErrorBody(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourceErrorBody(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,15 +94,15 @@ internal MoveResourceErrorBody(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,10 +115,10 @@ internal MoveResourceErrorBody(global::System.Management.Automation.PSObject con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.TypeConverter.cs index ae3aca588eae..31773b9e8acf 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.cs similarity index 85% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.cs index bab82552aa15..019f24c3712f 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// An error response from the Azure Migrate service. public partial class MoveResourceErrorBody : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal { /// Backing field for property. @@ -18,11 +18,11 @@ public partial class MoveResourceErrorBody : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] _detail; /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get => this._detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => this._detail; } /// Backing field for property. private string _message; @@ -34,16 +34,16 @@ public partial class MoveResourceErrorBody : public string Message { get => this._message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal.Detail { get => this._detail; set { {_detail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBodyInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBodyInternal.Target { get => this._target; set { {_target = value;} } } /// Backing field for property. private string _target; @@ -80,8 +80,8 @@ public partial interface IMoveResourceErrorBody : ReadOnly = true, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -113,7 +113,7 @@ internal partial interface IMoveResourceErrorBodyInternal /// string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.json.cs similarity index 93% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.json.cs index a45af2e788cb..c797144f2230 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceErrorBody.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceErrorBody.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourceErrorBody partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceErrorBody(json) : null; } @@ -73,7 +73,7 @@ internal MoveResourceErrorBody(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover. {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBody.FromJson(__u) )) ))() : null : Detail;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBody.FromJson(__u) )) ))() : null : Detail;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.PowerShell.cs similarity index 72% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.PowerShell.cs index 92e2a075a822..87912f56fa9d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class MoveResourceFilter partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourceFilter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourceFilter(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +94,13 @@ internal MoveResourceFilter(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceFilterPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).ProvisioningState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceFilterPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).ProvisioningState, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +113,8 @@ internal MoveResourceFilter(global::System.Management.Automation.PSObject conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceFilterPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal)this).ProvisioningState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceFilterPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal)this).ProvisioningState, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.TypeConverter.cs index 3655dd0df99e..ad8414130488 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.cs similarity index 64% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.cs index f1310ca5dce2..b1e48c550946 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.cs @@ -1,25 +1,25 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Move resource filter. public partial class MoveResourceFilter : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal { /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceFilterProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceFilterProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties _property; [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceFilterProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceFilterProperties()); set => this._property = value; } /// The provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterPropertiesInternal)Property).ProvisioningState = value; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Creates an new instance. public MoveResourceFilter() @@ -45,7 +45,7 @@ public partial interface IMoveResourceFilter : internal partial interface IMoveResourceFilterInternal { - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties Property { get; set; } /// The provisioning state. string ProvisioningState { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.json.cs index b9eaf16c50e9..a1bb67a02bfe 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilter.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilter.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourceFilter partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceFilter(json) : null; } @@ -70,7 +70,7 @@ internal MoveResourceFilter(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Run { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceFilterProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceFilterProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.PowerShell.cs similarity index 79% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.PowerShell.cs index 98ffd76f95dd..728a445c9e81 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -47,29 +47,29 @@ public partial class MoveResourceFilterProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourceFilterProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourceFilterProperties(content); } @@ -79,10 +79,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -95,12 +95,12 @@ internal MoveResourceFilterProperties(global::System.Collections.IDictionary con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -113,7 +113,7 @@ internal MoveResourceFilterProperties(global::System.Management.Automation.PSObj return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.TypeConverter.cs index b1b01389d29b..1e0ca642e8ac 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.cs similarity index 92% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.cs index 1ad9927d5464..65f41314f437 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.cs @@ -1,10 +1,10 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; public partial class MoveResourceFilterProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterPropertiesInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.json.cs index 368a5be360d0..3a715d65de64 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceFilterProperties.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceFilterProperties.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -46,13 +46,13 @@ public partial class MoveResourceFilterProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceFilterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceFilterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceFilterProperties(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.PowerShell.cs new file mode 100644 index 000000000000..c8d6cebb013f --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.PowerShell.cs @@ -0,0 +1,181 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the move resource properties. + [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesTypeConverter))] + public partial class MoveResourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MoveResourceProperties(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.ResourceMover.Models.Api202101.IMoveResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MoveResourceProperties(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.ResourceMover.Models.Api202101.IMoveResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MoveResourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ExistingTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).IsResolveRequired = (bool?) content.GetValueForProperty("IsResolveRequired",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).IsResolveRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesCode = (string) content.GetValueForProperty("ErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesMessage = (string) content.GetValueForProperty("ErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesTarget = (string) content.GetValueForProperty("ErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesCode = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesMessage = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesTarget = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MoveResourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus) content.GetValueForProperty("MoveStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ExistingTargetId = (string) content.GetValueForProperty("ExistingTargetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ExistingTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("ResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceResourceSetting = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) content.GetValueForProperty("SourceResourceSetting",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).SourceResourceSetting, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOn = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOnOverride = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[]) content.GetValueForProperty("DependsOnOverride",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).DependsOnOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyOverrideTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).IsResolveRequired = (bool?) content.GetValueForProperty("IsResolveRequired",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).IsResolveRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("MoveStatusJobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusJobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusMoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveStatusMoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusMoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusError = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("MoveStatusError",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusError, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("MoveStatusErrorsProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesCode = (string) content.GetValueForProperty("ErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesMessage = (string) content.GetValueForProperty("ErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesTarget = (string) content.GetValueForProperty("ErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("ErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).ErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesCode = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesCode",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesMessage = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesMessage",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesTarget = (string) content.GetValueForProperty("MoveStatusErrorsPropertiesTarget",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesTarget, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesDetail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("MoveStatusErrorsPropertiesDetail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal)this).MoveStatusErrorsPropertiesDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the move resource properties. + [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesTypeConverter))] + public partial interface IMoveResourceProperties + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.TypeConverter.cs index ed55f3feedc3..243e36c605c8 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.cs similarity index 52% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.cs index 6d328b58b660..ef95280c64ff 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.cs @@ -1,55 +1,55 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the move resource properties. public partial class MoveResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] _dependsOn; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] _dependsOn; /// Gets or sets the move resource dependencies. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] DependsOn { get => this._dependsOn; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] DependsOn { get => this._dependsOn; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] _dependsOnOverride; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] _dependsOnOverride; /// Gets or sets the move resource dependencies overrides. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] DependsOnOverride { get => this._dependsOnOverride; set => this._dependsOnOverride = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] DependsOnOverride { get => this._dependsOnOverride; set => this._dependsOnOverride = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors _error; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError _error; /// Defines the move resource errors. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrors()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError()); } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Code; } + public string ErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] ErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] ErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Message; } + public string ErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message; } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Target; } + public string ErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target; } /// Backing field for property. private string _existingTargetId; @@ -58,119 +58,121 @@ public partial class MoveResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] public string ExistingTargetId { get => this._existingTargetId; set => this._existingTargetId = value; } + /// Backing field for property. + private bool? _isResolveRequired; + + /// + /// Gets a value indicating whether the resolve action is required over the move collection. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public bool? IsResolveRequired { get => this._isResolveRequired; } + + /// Defines the job name. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatusJobName; } + + /// Gets or sets the monitoring job percentage. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatusJobProgress; } + /// Internal Acessors for DependsOn - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.DependsOn { get => this._dependsOn; set { {_dependsOn = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.DependsOn { get => this._dependsOn; set { {_dependsOn = value;} } } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrors()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError()); set { {_error = value;} } } - /// Internal Acessors for ErrorCode - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Code = value; } + /// Internal Acessors for ErrorsPropertiesCode + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.ErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code = value; } - /// Internal Acessors for ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.ErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Detail = value; } + /// Internal Acessors for ErrorsPropertiesDetail + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.ErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail = value; } - /// Internal Acessors for ErrorMessage - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Message = value; } + /// Internal Acessors for ErrorsPropertiesMessage + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.ErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message = value; } - /// Internal Acessors for ErrorProperty - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Property = value; } + /// Internal Acessors for ErrorsPropertiesTarget + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.ErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target = value; } - /// Internal Acessors for ErrorTarget - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.ErrorTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Target = value; } + /// Internal Acessors for ErrorsProperty + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.ErrorsProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Property = value; } - /// Internal Acessors for MoveStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatus { get => (this._moveStatus = this._moveStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatus()); set { {_moveStatus = value;} } } + /// Internal Acessors for IsResolveRequired + bool? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.IsResolveRequired { get => this._isResolveRequired; set { {_isResolveRequired = value;} } } - /// Internal Acessors for MoveStatusCode - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Code = value; } + /// Internal Acessors for JobStatusJobName + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatusJobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatusJobName = value; } - /// Internal Acessors for MoveStatusDetail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Detail = value; } + /// Internal Acessors for JobStatusJobProgress + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatusJobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatusJobProgress = value; } + + /// Internal Acessors for MoveStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatus { get => (this._moveStatus = this._moveStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatus()); set { {_moveStatus = value;} } } /// Internal Acessors for MoveStatusError - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Error = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Error = value; } - /// Internal Acessors for MoveStatusErrorProperty - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).ErrorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).ErrorProperty = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesCode + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Code = value; } - /// Internal Acessors for MoveStatusJobName - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatusJobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatusJobName = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesDetail + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Detail = value; } - /// Internal Acessors for MoveStatusJobProgress - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatusJobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatusJobProgress = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesMessage + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Message = value; } - /// Internal Acessors for MoveStatusJobStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusJobStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatus = value; } + /// Internal Acessors for MoveStatusErrorsPropertiesTarget + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Target = value; } - /// Internal Acessors for MoveStatusMessage - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Message = value; } + /// Internal Acessors for MoveStatusErrorsProperty + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusErrorsProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).ErrorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).ErrorProperty = value; } - /// Internal Acessors for MoveStatusMoveState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).MoveState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).MoveState = value; } - - /// Internal Acessors for MoveStatusTarget - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Target = value; } + /// Internal Acessors for MoveStatusJobStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusJobStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).JobStatus = value; } - /// Internal Acessors for MoveStatusTargetId - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.MoveStatusTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).TargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).TargetId = value; } + /// Internal Acessors for MoveStatusMoveState + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).MoveState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).MoveState = value; } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for ResourceSetting - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.ResourceSetting { get => (this._resourceSetting = this._resourceSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings()); set { {_resourceSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for SourceResourceSetting - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.SourceResourceSetting { get => (this._sourceResourceSetting = this._sourceResourceSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettings()); set { {_sourceResourceSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.SourceResourceSetting { get => (this._sourceResourceSetting = this._sourceResourceSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings()); set { {_sourceResourceSetting = value;} } } /// Internal Acessors for TargetId - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesInternal.TargetId { get => this._targetId; set { {_targetId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesInternal.TargetId { get => this._targetId; set { {_targetId = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus _moveStatus; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus _moveStatus; /// Defines the move resource status. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus MoveStatus { get => (this._moveStatus = this._moveStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatus()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus MoveStatus { get => (this._moveStatus = this._moveStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatus()); } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Code; } + public string MoveStatusErrorsPropertiesCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Code; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] MoveStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Detail; } - - /// Defines the job name. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? MoveStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatusJobName; } - - /// Gets or sets the monitoring job percentage. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).JobStatusJobProgress; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] MoveStatusErrorsPropertiesDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Detail; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Message; } - - /// Defines the MoveResource states. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).MoveState; } + public string MoveStatusErrorsPropertiesMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Message; } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).Target; } + public string MoveStatusErrorsPropertiesTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).Target; } - /// Gets the Target ARM Id of the resource. + /// Defines the MoveResource states. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string MoveStatusTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)MoveStatus).TargetId; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)MoveStatus).MoveState; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? _provisioningState; @@ -180,21 +182,11 @@ public partial class MoveResourceProperties : public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings _resourceSetting; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings _resourceSetting; /// Gets or sets the resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings ResourceSetting { get => (this._resourceSetting = this._resourceSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings()); set => this._resourceSetting = value; } - - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ResourceSettingResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)ResourceSetting).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)ResourceSetting).ResourceType = value; } - - /// Gets or sets the target Resource name. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string ResourceSettingTargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)ResourceSetting).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)ResourceSetting).TargetResourceName = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ResourceSetting { get => (this._resourceSetting = this._resourceSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings()); set => this._resourceSetting = value; } /// Backing field for property. private string _sourceId; @@ -204,21 +196,11 @@ public partial class MoveResourceProperties : public string SourceId { get => this._sourceId; set => this._sourceId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings _sourceResourceSetting; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings _sourceResourceSetting; /// Gets or sets the source resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings SourceResourceSetting { get => (this._sourceResourceSetting = this._sourceResourceSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettings()); } - - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SourceResourceSettingResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)SourceResourceSetting).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)SourceResourceSetting).ResourceType = value; } - - /// Gets or sets the target Resource name. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SourceResourceSettingTargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)SourceResourceSetting).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)SourceResourceSetting).TargetResourceName = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings SourceResourceSetting { get => (this._sourceResourceSetting = this._sourceResourceSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings()); } /// Backing field for property. private string _targetId; @@ -243,16 +225,16 @@ public partial interface IMoveResourceProperties : ReadOnly = true, Description = @"Gets or sets the move resource dependencies.", SerializedName = @"dependsOn", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] DependsOn { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] DependsOn { get; } /// Gets or sets the move resource dependencies overrides. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, Description = @"Gets or sets the move resource dependencies overrides.", SerializedName = @"dependsOnOverrides", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// @@ -262,15 +244,15 @@ public partial interface IMoveResourceProperties : Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] - string ErrorCode { get; } + string ErrorsPropertiesCode { get; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] ErrorDetail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] ErrorsPropertiesDetail { get; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -280,7 +262,7 @@ public partial interface IMoveResourceProperties : Description = @"A message describing the error, intended to be suitable for display in a user interface.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] - string ErrorMessage { get; } + string ErrorsPropertiesMessage { get; } /// /// The target of the particular error. For example, the name of the property in error. /// @@ -290,7 +272,7 @@ public partial interface IMoveResourceProperties : Description = @"The target of the particular error. For example, the name of the property in error.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] - string ErrorTarget { get; } + string ErrorsPropertiesTarget { get; } /// Gets or sets the existing target ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -300,23 +282,15 @@ public partial interface IMoveResourceProperties : PossibleTypes = new [] { typeof(string) })] string ExistingTargetId { get; set; } /// - /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// Gets a value indicating whether the resolve action is required over the move collection. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string MoveStatusCode { get; } - /// A list of additional details about the error. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of additional details about the error.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] MoveStatusDetail { get; } + Description = @"Gets a value indicating whether the resolve action is required over the move collection.", + SerializedName = @"isResolveRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsResolveRequired { get; } /// Defines the job name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -324,7 +298,7 @@ public partial interface IMoveResourceProperties : Description = @"Defines the job name.", SerializedName = @"jobName", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? MoveStatusJobName { get; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get; } /// Gets or sets the monitoring job percentage. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -332,25 +306,35 @@ public partial interface IMoveResourceProperties : Description = @"Gets or sets the monitoring job percentage.", SerializedName = @"jobProgress", PossibleTypes = new [] { typeof(string) })] - string MoveStatusJobProgress { get; } + string JobStatusJobProgress { get; } /// - /// A message describing the error, intended to be suitable for display in a user interface. + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"A message describing the error, intended to be suitable for display in a user interface.", - SerializedName = @"message", + Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", + SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] - string MoveStatusMessage { get; } - /// Defines the MoveResource states. + string MoveStatusErrorsPropertiesCode { get; } + /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Defines the MoveResource states.", - SerializedName = @"moveState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; } + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] MoveStatusErrorsPropertiesDetail { get; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string MoveStatusErrorsPropertiesMessage { get; } /// /// The target of the particular error. For example, the name of the property in error. /// @@ -360,15 +344,15 @@ public partial interface IMoveResourceProperties : Description = @"The target of the particular error. For example, the name of the property in error.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] - string MoveStatusTarget { get; } - /// Gets the Target ARM Id of the resource. + string MoveStatusErrorsPropertiesTarget { get; } + /// Defines the MoveResource states. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Gets the Target ARM Id of the resource.", - SerializedName = @"targetId", - PossibleTypes = new [] { typeof(string) })] - string MoveStatusTargetId { get; } + Description = @"Defines the MoveResource states.", + SerializedName = @"moveState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; } /// Defines the provisioning states. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -377,24 +361,14 @@ public partial interface IMoveResourceProperties : SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState) })] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The resource type. For example, the value can be Microsoft.Compute/virtualMachines.", - SerializedName = @"resourceType", - PossibleTypes = new [] { typeof(string) })] - string ResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. + /// Gets or sets the resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, - Description = @"Gets or sets the target Resource name.", - SerializedName = @"targetResourceName", - PossibleTypes = new [] { typeof(string) })] - string ResourceSettingTargetResourceName { get; set; } + Description = @"Gets or sets the resource settings.", + SerializedName = @"resourceSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ResourceSetting { get; set; } /// Gets or sets the Source ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = true, @@ -403,24 +377,14 @@ public partial interface IMoveResourceProperties : SerializedName = @"sourceId", PossibleTypes = new [] { typeof(string) })] string SourceId { get; set; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The resource type. For example, the value can be Microsoft.Compute/virtualMachines.", - SerializedName = @"resourceType", - PossibleTypes = new [] { typeof(string) })] - string SourceResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. + /// Gets or sets the source resource settings. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Gets or sets the target Resource name.", - SerializedName = @"targetResourceName", - PossibleTypes = new [] { typeof(string) })] - string SourceResourceSettingTargetResourceName { get; set; } + Required = false, + ReadOnly = true, + Description = @"Gets or sets the source resource settings.", + SerializedName = @"sourceResourceSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings SourceResourceSetting { get; } /// Gets or sets the Target ARM Id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -436,79 +400,69 @@ internal partial interface IMoveResourcePropertiesInternal { /// Gets or sets the move resource dependencies. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency[] DependsOn { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency[] DependsOn { get; set; } /// Gets or sets the move resource dependencies overrides. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] DependsOnOverride { get; set; } /// Defines the move resource errors. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get; set; } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// - string ErrorCode { get; set; } + string ErrorsPropertiesCode { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] ErrorDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] ErrorsPropertiesDetail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// - string ErrorMessage { get; set; } - /// The move resource error body. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody ErrorProperty { get; set; } + string ErrorsPropertiesMessage { get; set; } /// /// The target of the particular error. For example, the name of the property in error. /// - string ErrorTarget { get; set; } + string ErrorsPropertiesTarget { get; set; } + /// The move resource error body. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody ErrorsProperty { get; set; } /// Gets or sets the existing target ARM Id of the resource. string ExistingTargetId { get; set; } + /// + /// Gets a value indicating whether the resolve action is required over the move collection. + /// + bool? IsResolveRequired { get; set; } + /// Defines the job name. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get; set; } + /// Gets or sets the monitoring job percentage. + string JobStatusJobProgress { get; set; } /// Defines the move resource status. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus MoveStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus MoveStatus { get; set; } + /// An error response from the azure resource mover service. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError MoveStatusError { get; set; } /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// - string MoveStatusCode { get; set; } + string MoveStatusErrorsPropertiesCode { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] MoveStatusDetail { get; set; } - /// An error response from the azure region move service. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError MoveStatusError { get; set; } - /// The move resource error body. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody MoveStatusErrorProperty { get; set; } - /// Defines the job name. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? MoveStatusJobName { get; set; } - /// Gets or sets the monitoring job percentage. - string MoveStatusJobProgress { get; set; } - /// Defines the job status. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus MoveStatusJobStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] MoveStatusErrorsPropertiesDetail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// - string MoveStatusMessage { get; set; } - /// Defines the MoveResource states. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; set; } + string MoveStatusErrorsPropertiesMessage { get; set; } /// /// The target of the particular error. For example, the name of the property in error. /// - string MoveStatusTarget { get; set; } - /// Gets the Target ARM Id of the resource. - string MoveStatusTargetId { get; set; } + string MoveStatusErrorsPropertiesTarget { get; set; } + /// The move resource error body. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody MoveStatusErrorsProperty { get; set; } + /// Defines the job status. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus MoveStatusJobStatus { get; set; } + /// Defines the MoveResource states. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveStatusMoveState { get; set; } /// Defines the provisioning states. Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningState? ProvisioningState { get; set; } /// Gets or sets the resource settings. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings ResourceSetting { get; set; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - string ResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. - string ResourceSettingTargetResourceName { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ResourceSetting { get; set; } /// Gets or sets the Source ARM Id of the resource. string SourceId { get; set; } /// Gets or sets the source resource settings. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings SourceResourceSetting { get; set; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - string SourceResourceSettingResourceType { get; set; } - /// Gets or sets the target Resource name. - string SourceResourceSettingTargetResourceName { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings SourceResourceSetting { get; set; } /// Gets or sets the Target ARM Id of the resource. string TargetId { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.json.cs similarity index 85% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.json.cs index 79a17f68f8e2..01338bfd6699 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceProperties.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceProperties.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceProperties(json) : null; } @@ -70,16 +70,17 @@ internal MoveResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover { return; } - {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesErrors.FromJson(__jsonErrors) : Error;} - {_moveStatus = If( json?.PropertyT("moveStatus"), out var __jsonMoveStatus) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesMoveStatus.FromJson(__jsonMoveStatus) : MoveStatus;} - {_resourceSetting = If( json?.PropertyT("resourceSettings"), out var __jsonResourceSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings.FromJson(__jsonResourceSettings) : ResourceSetting;} - {_sourceResourceSetting = If( json?.PropertyT("sourceResourceSettings"), out var __jsonSourceResourceSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourcePropertiesSourceResourceSettings.FromJson(__jsonSourceResourceSettings) : SourceResourceSetting;} - {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependency) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependency.FromJson(__u) )) ))() : null : DependsOn;} - {_dependsOnOverride = If( json?.PropertyT("dependsOnOverrides"), out var __jsonDependsOnOverrides) ? If( __jsonDependsOnOverrides as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceDependencyOverride.FromJson(__p) )) ))() : null : DependsOnOverride;} - {_existingTargetId = If( json?.PropertyT("existingTargetId"), out var __jsonExistingTargetId) ? (string)__jsonExistingTargetId : (string)ExistingTargetId;} + {_moveStatus = If( json?.PropertyT("moveStatus"), out var __jsonMoveStatus) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatus.FromJson(__jsonMoveStatus) : MoveStatus;} + {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError.FromJson(__jsonErrors) : Error;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_sourceId = If( json?.PropertyT("sourceId"), out var __jsonSourceId) ? (string)__jsonSourceId : (string)SourceId;} {_targetId = If( json?.PropertyT("targetId"), out var __jsonTargetId) ? (string)__jsonTargetId : (string)TargetId;} + {_existingTargetId = If( json?.PropertyT("existingTargetId"), out var __jsonExistingTargetId) ? (string)__jsonExistingTargetId : (string)ExistingTargetId;} + {_resourceSetting = If( json?.PropertyT("resourceSettings"), out var __jsonResourceSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings.FromJson(__jsonResourceSettings) : ResourceSetting;} + {_sourceResourceSetting = If( json?.PropertyT("sourceResourceSettings"), out var __jsonSourceResourceSettings) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings.FromJson(__jsonSourceResourceSettings) : SourceResourceSetting;} + {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependency) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependency.FromJson(__u) )) ))() : null : DependsOn;} + {_dependsOnOverride = If( json?.PropertyT("dependsOnOverrides"), out var __jsonDependsOnOverrides) ? If( __jsonDependsOnOverrides as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceDependencyOverride.FromJson(__p) )) ))() : null : DependsOnOverride;} + {_isResolveRequired = If( json?.PropertyT("isResolveRequired"), out var __jsonIsResolveRequired) ? (bool?)__jsonIsResolveRequired : IsResolveRequired;} AfterFromJson(json); } @@ -103,13 +104,23 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._moveStatus ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._moveStatus.ToJson(null,serializationMode) : null, "moveStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "errors" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != this._moveStatus ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._moveStatus.ToJson(null,serializationMode) : null, "moveStatus" ,container.Add ); + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } + AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._targetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetId.ToString()) : null, "targetId" ,container.Add ); + } + AddIf( null != (((object)this._existingTargetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._existingTargetId.ToString()) : null, "existingTargetId" ,container.Add ); AddIf( null != this._resourceSetting ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._resourceSetting.ToJson(null,serializationMode) : null, "resourceSettings" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { @@ -136,15 +147,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("dependsOnOverrides",__r); } - AddIf( null != (((object)this._existingTargetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._existingTargetId.ToString()) : null, "existingTargetId" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); - } - AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._targetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetId.ToString()) : null, "targetId" ,container.Add ); + AddIf( null != this._isResolveRequired ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._isResolveRequired) : null, "isResolveRequired" ,container.Add ); } AfterToJson(ref container); return container; diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.PowerShell.cs similarity index 60% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.PowerShell.cs index d097cde2b5e1..5856d458def0 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class MoveResourcePropertiesErrors partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MoveResourcePropertiesErrors(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MoveResourcePropertiesErrors(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,16 +96,16 @@ internal MoveResourcePropertiesErrors(global::System.Collections.IDictionary con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -118,11 +118,11 @@ internal MoveResourcePropertiesErrors(global::System.Management.Automation.PSObj return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.TypeConverter.cs index dc3c2e17046c..a41b41eda84b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.cs similarity index 59% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.cs index 5185f559d883..1ddfd4900e13 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.cs @@ -1,56 +1,56 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the move resource errors. public partial class MoveResourcePropertiesErrors : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrorsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrorsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError __moveResourceError = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceError(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError __moveResourceError = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError(); /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Code; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Detail; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Detail = value; } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Target = value; } /// The move resource error body. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Property = value ?? null /* model class */; } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)__moveResourceError).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)__moveResourceError).Target; } /// Creates an new instance. public MoveResourcePropertiesErrors() @@ -73,13 +73,13 @@ public MoveResourcePropertiesErrors() /// Defines the move resource errors. public partial interface IMoveResourcePropertiesErrors : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError { } /// Defines the move resource errors. internal partial interface IMoveResourcePropertiesErrorsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.json.cs index 326f7ce5f45a..e5b0c81e65fc 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesErrors.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesErrors.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourcePropertiesErrors partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesErrors FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesErrors FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourcePropertiesErrors(json) : null; } @@ -70,7 +70,7 @@ internal MoveResourcePropertiesErrors(Microsoft.Azure.PowerShell.Cmdlets.Resourc { return; } - __moveResourceError = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceError(json); + __moveResourceError = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError(json); AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.PowerShell.cs new file mode 100644 index 000000000000..4270f51eb628 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.PowerShell.cs @@ -0,0 +1,151 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the move resource status. + [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesMoveStatusTypeConverter))] + public partial class MoveResourcePropertiesMoveStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MoveResourcePropertiesMoveStatus(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.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MoveResourcePropertiesMoveStatus(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.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MoveResourcePropertiesMoveStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MoveResourcePropertiesMoveStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the move resource status. + [System.ComponentModel.TypeConverter(typeof(MoveResourcePropertiesMoveStatusTypeConverter))] + public partial interface IMoveResourcePropertiesMoveStatus + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.TypeConverter.cs index 26015bcf3d01..6b1d5449c665 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.cs similarity index 50% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.cs index d1150219b6bf..54b5fe7ef4bd 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.cs @@ -1,92 +1,85 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the move resource status. public partial class MoveResourcePropertiesMoveStatus : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatusInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatusInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus __moveResourceStatus = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceStatus(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus __moveResourceStatus = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatus(); /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Code; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Detail; } - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Error = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Error = value ?? null /* model class */; } /// The move resource error body. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).ErrorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).ErrorProperty = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).ErrorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).ErrorProperty = value ?? null /* model class */; } /// Defines the job status. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus JobStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatus = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus JobStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatus = value ?? null /* model class */; } /// Defines the job name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobName; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobName; } /// Gets or sets the monitoring job percentage. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobProgress; } + public string JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobProgress; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Detail = value; } /// Internal Acessors for JobStatusJobName - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobName = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobName = value; } /// Internal Acessors for JobStatusJobProgress - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobProgress = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).JobStatusJobProgress = value; } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Message = value; } /// Internal Acessors for MoveState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.MoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).MoveState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).MoveState = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.MoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).MoveState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).MoveState = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Target = value; } - - /// Internal Acessors for TargetId - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).TargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).TargetId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Target = value; } /// Defines the MoveResource states. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).MoveState; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? MoveState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).MoveState; } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).Target; } - - /// Gets the Target ARM Id of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal)__moveResourceStatus).TargetId; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)__moveResourceStatus).Target; } /// Creates an new instance. public MoveResourcePropertiesMoveStatus() @@ -109,13 +102,13 @@ public MoveResourcePropertiesMoveStatus() /// Defines the move resource status. public partial interface IMoveResourcePropertiesMoveStatus : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus { } /// Defines the move resource status. internal partial interface IMoveResourcePropertiesMoveStatusInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.json.cs index 665a97a5886b..68e51ee1d091 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesMoveStatus.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourcePropertiesMoveStatus.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourcePropertiesMoveStatus partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesMoveStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourcePropertiesMoveStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourcePropertiesMoveStatus(json) : null; } @@ -70,7 +70,7 @@ internal MoveResourcePropertiesMoveStatus(Microsoft.Azure.PowerShell.Cmdlets.Res { return; } - __moveResourceStatus = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceStatus(json); + __moveResourceStatus = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceStatus(json); AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.PowerShell.cs new file mode 100644 index 000000000000..d2a1e0e2499e --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.PowerShell.cs @@ -0,0 +1,149 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the move resource status. + [System.ComponentModel.TypeConverter(typeof(MoveResourceStatusTypeConverter))] + public partial class MoveResourceStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MoveResourceStatus(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.ResourceMover.Models.Api202101.IMoveResourceStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MoveResourceStatus(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.ResourceMover.Models.Api202101.IMoveResourceStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MoveResourceStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MoveResourceStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus) content.GetValueForProperty("JobStatus",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatus, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatusTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState?) content.GetValueForProperty("MoveState",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).MoveState, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName?) content.GetValueForProperty("JobStatusJobName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress = (string) content.GetValueForProperty("JobStatusJobProgress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).JobStatusJobProgress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) content.GetValueForProperty("ErrorProperty",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).ErrorProperty, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceErrorBodyTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the move resource status. + [System.ComponentModel.TypeConverter(typeof(MoveResourceStatusTypeConverter))] + public partial interface IMoveResourceStatus + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.TypeConverter.cs index c921c10208e1..dee6f190fe84 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.cs similarity index 62% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.cs index bb714ce04f0f..e8ec7ba1df3b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.cs @@ -1,83 +1,80 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the move resource status. public partial class MoveResourceStatus : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal { /// /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError _error; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError _error; - /// An error response from the azure region move service. + /// An error response from the azure resource mover service. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceError()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError()); set => this._error = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus _jobStatus; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus _jobStatus; /// Defines the job status. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus JobStatus { get => (this._jobStatus = this._jobStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatus()); set => this._jobStatus = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus JobStatus { get => (this._jobStatus = this._jobStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatus()); set => this._jobStatus = value; } /// Defines the job name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)JobStatus).JobName; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)JobStatus).JobName; } /// Gets or sets the monitoring job percentage. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)JobStatus).JobProgress; } + public string JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)JobStatus).JobProgress; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError()); set { {_error = value;} } } /// Internal Acessors for ErrorProperty - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Property = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.ErrorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Property = value; } /// Internal Acessors for JobStatus - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.JobStatus { get => (this._jobStatus = this._jobStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatus()); set { {_jobStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.JobStatus { get => (this._jobStatus = this._jobStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatus()); set { {_jobStatus = value;} } } /// Internal Acessors for JobStatusJobName - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)JobStatus).JobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)JobStatus).JobName = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.JobStatusJobName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)JobStatus).JobName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)JobStatus).JobName = value; } /// Internal Acessors for JobStatusJobProgress - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)JobStatus).JobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatusInternal)JobStatus).JobProgress = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.JobStatusJobProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)JobStatus).JobProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatusInternal)JobStatus).JobProgress = value; } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Message = value; } /// Internal Acessors for MoveState - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.MoveState { get => this._moveState; set { {_moveState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.MoveState { get => this._moveState; set { {_moveState = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Target = value; } - - /// Internal Acessors for TargetId - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatusInternal.TargetId { get => this._targetId; set { {_targetId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatusInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState? _moveState; @@ -90,14 +87,7 @@ public partial class MoveResourceStatus : /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorInternal)Error).Target; } - - /// Backing field for property. - private string _targetId; - - /// Gets the Target ARM Id of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string TargetId { get => this._targetId; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorInternal)Error).Target; } /// Creates an new instance. public MoveResourceStatus() @@ -125,8 +115,8 @@ public partial interface IMoveResourceStatus : ReadOnly = true, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; } /// Defines the job name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -171,14 +161,6 @@ public partial interface IMoveResourceStatus : SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] string Target { get; } - /// Gets the Target ARM Id of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Gets the Target ARM Id of the resource.", - SerializedName = @"targetId", - PossibleTypes = new [] { typeof(string) })] - string TargetId { get; } } /// Defines the move resource status. @@ -190,13 +172,13 @@ internal partial interface IMoveResourceStatusInternal /// string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody[] Detail { get; set; } - /// An error response from the azure region move service. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody[] Detail { get; set; } + /// An error response from the azure resource mover service. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceError Error { get; set; } /// The move resource error body. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceErrorBody ErrorProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceErrorBody ErrorProperty { get; set; } /// Defines the job status. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IJobStatus JobStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IJobStatus JobStatus { get; set; } /// Defines the job name. Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobName? JobStatusJobName { get; set; } /// Gets or sets the monitoring job percentage. @@ -211,8 +193,6 @@ internal partial interface IMoveResourceStatusInternal /// The target of the particular error. For example, the name of the property in error. /// string Target { get; set; } - /// Gets the Target ARM Id of the resource. - string TargetId { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.json.cs b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.json.cs similarity index 87% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.json.cs index f88e7d88de66..d4a39c234f1f 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourceStatus.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/MoveResourceStatus.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class MoveResourceStatus partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new MoveResourceStatus(json) : null; } @@ -70,10 +70,9 @@ internal MoveResourceStatus(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Run { return; } - {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceError.FromJson(__jsonErrors) : Error;} - {_jobStatus = If( json?.PropertyT("jobStatus"), out var __jsonJobStatus) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.JobStatus.FromJson(__jsonJobStatus) : JobStatus;} + {_jobStatus = If( json?.PropertyT("jobStatus"), out var __jsonJobStatus) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.JobStatus.FromJson(__jsonJobStatus) : JobStatus;} + {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceError.FromJson(__jsonErrors) : Error;} {_moveState = If( json?.PropertyT("moveState"), out var __jsonMoveState) ? (string)__jsonMoveState : (string)MoveState;} - {_targetId = If( json?.PropertyT("targetId"), out var __jsonTargetId) ? (string)__jsonTargetId : (string)TargetId;} AfterFromJson(json); } @@ -96,16 +95,12 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "errors" ,container.Add ); AddIf( null != this._jobStatus ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._jobStatus.ToJson(null,serializationMode) : null, "jobStatus" ,container.Add ); + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "errors" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._moveState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveState.ToString()) : null, "moveState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._targetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetId.ToString()) : null, "targetId" ,container.Add ); - } AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.PowerShell.cs similarity index 62% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.PowerShell.cs index 3013439811d6..1c4cbbc217b1 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class NetworkInterfaceResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkInterfaceResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkInterfaceResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,15 +96,15 @@ internal NetworkInterfaceResourceSettings(global::System.Collections.IDictionary return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking = (bool?) content.GetValueForProperty("EnableAcceleratedNetworking",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings[]) content.GetValueForProperty("IPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NicIPConfigurationResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings[]) content.GetValueForProperty("IPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NicIPConfigurationResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking = (bool?) content.GetValueForProperty("EnableAcceleratedNetworking",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,10 +117,10 @@ internal NetworkInterfaceResourceSettings(global::System.Management.Automation.P return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking = (bool?) content.GetValueForProperty("EnableAcceleratedNetworking",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings[]) content.GetValueForProperty("IPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NicIPConfigurationResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings[]) content.GetValueForProperty("IPConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).IPConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NicIPConfigurationResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking = (bool?) content.GetValueForProperty("EnableAcceleratedNetworking",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal)this).EnableAcceleratedNetworking, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.TypeConverter.cs index 40b631c42f60..2eb7c1b2cbeb 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.cs similarity index 76% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.cs index 4023681829f9..e19b68cad4f0 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.cs @@ -1,18 +1,18 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the network interface resource settings. public partial class NetworkInterfaceResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// Backing field for property. private bool? _enableAcceleratedNetworking; @@ -22,21 +22,21 @@ public partial class NetworkInterfaceResourceSettings : public bool? EnableAcceleratedNetworking { get => this._enableAcceleratedNetworking; set => this._enableAcceleratedNetworking = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings[] _iPConfiguration; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings[] _iPConfiguration; /// Gets or sets the IP configurations of the NIC. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings[] IPConfiguration { get => this._iPConfiguration; set => this._iPConfiguration = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings[] IPConfiguration { get => this._iPConfiguration; set => this._iPConfiguration = value; } /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Creates an new instance. public NetworkInterfaceResourceSettings() @@ -59,7 +59,7 @@ public NetworkInterfaceResourceSettings() /// Defines the network interface resource settings. public partial interface INetworkInterfaceResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Gets or sets a value indicating whether accelerated networking is enabled. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -75,18 +75,18 @@ public partial interface INetworkInterfaceResourceSettings : ReadOnly = false, Description = @"Gets or sets the IP configurations of the NIC.", SerializedName = @"ipConfigurations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings[] IPConfiguration { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings[] IPConfiguration { get; set; } } /// Defines the network interface resource settings. internal partial interface INetworkInterfaceResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Gets or sets a value indicating whether accelerated networking is enabled. bool? EnableAcceleratedNetworking { get; set; } /// Gets or sets the IP configurations of the NIC. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings[] IPConfiguration { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings[] IPConfiguration { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.json.cs similarity index 89% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.json.cs index b7817cb7f7a4..b1441b02552f 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkInterfaceResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkInterfaceResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class NetworkInterfaceResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkInterfaceResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkInterfaceResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new NetworkInterfaceResourceSettings(json) : null; } @@ -70,9 +70,9 @@ internal NetworkInterfaceResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Res { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); + {_iPConfiguration = If( json?.PropertyT("ipConfigurations"), out var __jsonIPConfigurations) ? If( __jsonIPConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NicIPConfigurationResourceSettings.FromJson(__u) )) ))() : null : IPConfiguration;} {_enableAcceleratedNetworking = If( json?.PropertyT("enableAcceleratedNetworking"), out var __jsonEnableAcceleratedNetworking) ? (bool?)__jsonEnableAcceleratedNetworking : EnableAcceleratedNetworking;} - {_iPConfiguration = If( json?.PropertyT("ipConfigurations"), out var __jsonIPConfigurations) ? If( __jsonIPConfigurations as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NicIPConfigurationResourceSettings.FromJson(__u) )) ))() : null : IPConfiguration;} AfterFromJson(json); } @@ -96,7 +96,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } __resourceSettings?.ToJson(container, serializationMode); - AddIf( null != this._enableAcceleratedNetworking ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._enableAcceleratedNetworking) : null, "enableAcceleratedNetworking" ,container.Add ); if (null != this._iPConfiguration) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -106,6 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("ipConfigurations",__w); } + AddIf( null != this._enableAcceleratedNetworking ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._enableAcceleratedNetworking) : null, "enableAcceleratedNetworking" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.PowerShell.cs similarity index 67% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.PowerShell.cs index b3f7787f04d0..6c188cbae20b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class NetworkSecurityGroupResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkSecurityGroupResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkSecurityGroupResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,14 +96,14 @@ internal NetworkSecurityGroupResourceSettings(global::System.Collections.IDictio return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule[]) content.GetValueForProperty("SecurityRule",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NsgSecurityRuleTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule[]) content.GetValueForProperty("SecurityRule",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgSecurityRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -116,9 +116,9 @@ internal NetworkSecurityGroupResourceSettings(global::System.Management.Automati return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule[]) content.GetValueForProperty("SecurityRule",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NsgSecurityRuleTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule[]) content.GetValueForProperty("SecurityRule",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettingsInternal)this).SecurityRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgSecurityRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.TypeConverter.cs index 0bd33c641573..204edf8f7576 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -103,14 +103,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.cs similarity index 72% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.cs index eb484d25caa3..bd4e86084155 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.cs @@ -1,35 +1,35 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the NSG resource settings. public partial class NetworkSecurityGroupResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule[] _securityRule; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule[] _securityRule; /// Gets or sets Security rules of network security group. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule[] SecurityRule { get => this._securityRule; set => this._securityRule = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule[] SecurityRule { get => this._securityRule; set => this._securityRule = value; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Creates an new instance. public NetworkSecurityGroupResourceSettings() @@ -52,7 +52,7 @@ public NetworkSecurityGroupResourceSettings() /// Defines the NSG resource settings. public partial interface INetworkSecurityGroupResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Gets or sets Security rules of network security group. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -60,16 +60,16 @@ public partial interface INetworkSecurityGroupResourceSettings : ReadOnly = false, Description = @"Gets or sets Security rules of network security group.", SerializedName = @"securityRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule[] SecurityRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule[] SecurityRule { get; set; } } /// Defines the NSG resource settings. internal partial interface INetworkSecurityGroupResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Gets or sets Security rules of network security group. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule[] SecurityRule { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule[] SecurityRule { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.json.cs similarity index 89% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.json.cs index a8baf1182859..8d2d98ae4393 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NetworkSecurityGroupResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NetworkSecurityGroupResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class NetworkSecurityGroupResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INetworkSecurityGroupResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INetworkSecurityGroupResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new NetworkSecurityGroupResourceSettings(json) : null; } @@ -70,8 +70,8 @@ internal NetworkSecurityGroupResourceSettings(Microsoft.Azure.PowerShell.Cmdlets { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); - {_securityRule = If( json?.PropertyT("securityRules"), out var __jsonSecurityRules) ? If( __jsonSecurityRules as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.NsgSecurityRule.FromJson(__u) )) ))() : null : SecurityRule;} + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); + {_securityRule = If( json?.PropertyT("securityRules"), out var __jsonSecurityRules) ? If( __jsonSecurityRules as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NsgSecurityRule.FromJson(__u) )) ))() : null : SecurityRule;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.PowerShell.cs new file mode 100644 index 000000000000..92b4fcfcb7d9 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.PowerShell.cs @@ -0,0 +1,153 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines NIC IP configuration properties. + [System.ComponentModel.TypeConverter(typeof(NicIPConfigurationResourceSettingsTypeConverter))] + public partial class NicIPConfigurationResourceSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NicIPConfigurationResourceSettings(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.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NicIPConfigurationResourceSettings(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.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NicIPConfigurationResourceSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIP = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference) content.GetValueForProperty("PublicIP",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIP, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Primary = (bool?) content.GetValueForProperty("Primary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Primary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[]) content.GetValueForProperty("LoadBalancerBackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerNatRule = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[]) content.GetValueForProperty("LoadBalancerNatRule",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerNatRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIPSourceArmResourceId = (string) content.GetValueForProperty("PublicIPSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIPSourceArmResourceId, 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 NicIPConfigurationResourceSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIP = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference) content.GetValueForProperty("PublicIP",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIP, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress = (string) content.GetValueForProperty("PrivateIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAddress, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod = (string) content.GetValueForProperty("PrivateIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PrivateIPAllocationMethod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Primary = (bool?) content.GetValueForProperty("Primary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).Primary, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[]) content.GetValueForProperty("LoadBalancerBackendAddressPool",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerBackendAddressPool, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerNatRule = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[]) content.GetValueForProperty("LoadBalancerNatRule",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).LoadBalancerNatRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId = (string) content.GetValueForProperty("SubnetSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetSourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetName = (string) content.GetValueForProperty("SubnetName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).SubnetName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIPSourceArmResourceId = (string) content.GetValueForProperty("PublicIPSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal)this).PublicIPSourceArmResourceId, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines NIC IP configuration properties. + [System.ComponentModel.TypeConverter(typeof(NicIPConfigurationResourceSettingsTypeConverter))] + public partial interface INicIPConfigurationResourceSettings + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.TypeConverter.cs index 42d8c332764b..2ac7f6500f86 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -102,14 +102,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.cs similarity index 58% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.cs index 0b7c7240f1cc..57acda8cf26b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.cs @@ -1,22 +1,32 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines NIC IP configuration properties. public partial class NicIPConfigurationResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference[] _loadBalancerBackendAddressPool; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] _loadBalancerBackendAddressPool; /// Gets or sets the references of the load balancer backend address pools. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference[] LoadBalancerBackendAddressPool { get => this._loadBalancerBackendAddressPool; set => this._loadBalancerBackendAddressPool = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] LoadBalancerBackendAddressPool { get => this._loadBalancerBackendAddressPool; set => this._loadBalancerBackendAddressPool = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] _loadBalancerNatRule; + + /// Gets or sets the references of the load balancer NAT rules. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] LoadBalancerNatRule { get => this._loadBalancerNatRule; set => this._loadBalancerNatRule = value; } + + /// Internal Acessors for PublicIP + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal.PublicIP { get => (this._publicIP = this._publicIP ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference()); set { {_publicIP = value;} } } /// Internal Acessors for Subnet - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettingsInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference()); set { {_subnet = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettingsInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference()); set { {_subnet = value;} } } /// Backing field for property. private string _name; @@ -46,20 +56,31 @@ public partial class NicIPConfigurationResourceSettings : [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] public string PrivateIPAllocationMethod { get => this._privateIPAllocationMethod; set => this._privateIPAllocationMethod = value; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference _publicIP; + + /// Defines reference to an Azure resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference PublicIP { get => (this._publicIP = this._publicIP ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference()); set => this._publicIP = value; } + + /// Gets the ARM resource ID of the tracked resource being referenced. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string PublicIPSourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)PublicIP).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)PublicIP).SourceArmResourceId = value ?? null; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference _subnet; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference _subnet; - /// Defines reference to subnet. + /// Defines reference to a proxy resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference()); set => this._subnet = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference()); set => this._subnet = value; } /// Gets the name of the proxy resource on the target side. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SubnetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)Subnet).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)Subnet).Name = value; } + public string SubnetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)Subnet).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)Subnet).Name = value ?? null; } /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string SubnetSourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId = value; } + public string SubnetSourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)Subnet).SourceArmResourceId = value ?? null; } /// Creates an new instance. public NicIPConfigurationResourceSettings() @@ -77,8 +98,16 @@ public partial interface INicIPConfigurationResourceSettings : ReadOnly = false, Description = @"Gets or sets the references of the load balancer backend address pools.", SerializedName = @"loadBalancerBackendAddressPools", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference[] LoadBalancerBackendAddressPool { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] LoadBalancerBackendAddressPool { get; set; } + /// Gets or sets the references of the load balancer NAT rules. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the references of the load balancer NAT rules.", + SerializedName = @"loadBalancerNatRules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] LoadBalancerNatRule { get; set; } /// Gets or sets the IP configuration name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -111,6 +140,14 @@ public partial interface INicIPConfigurationResourceSettings : SerializedName = @"privateIpAllocationMethod", PossibleTypes = new [] { typeof(string) })] string PrivateIPAllocationMethod { get; set; } + /// Gets the ARM resource ID of the tracked resource being referenced. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the ARM resource ID of the tracked resource being referenced.", + SerializedName = @"sourceArmResourceId", + PossibleTypes = new [] { typeof(string) })] + string PublicIPSourceArmResourceId { get; set; } /// Gets the name of the proxy resource on the target side. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -121,7 +158,7 @@ public partial interface INicIPConfigurationResourceSettings : string SubnetName { get; set; } /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, Description = @"Gets the ARM resource ID of the tracked resource being referenced.", SerializedName = @"sourceArmResourceId", @@ -134,7 +171,9 @@ internal partial interface INicIPConfigurationResourceSettingsInternal { /// Gets or sets the references of the load balancer backend address pools. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference[] LoadBalancerBackendAddressPool { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] LoadBalancerBackendAddressPool { get; set; } + /// Gets or sets the references of the load balancer NAT rules. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference[] LoadBalancerNatRule { get; set; } /// Gets or sets the IP configuration name. string Name { get; set; } /// Gets or sets a value indicating whether this IP configuration is the primary. @@ -143,8 +182,12 @@ internal partial interface INicIPConfigurationResourceSettingsInternal string PrivateIPAddress { get; set; } /// Gets or sets the private IP address allocation method. string PrivateIPAllocationMethod { get; set; } - /// Defines reference to subnet. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference Subnet { get; set; } + /// Defines reference to an Azure resource. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference PublicIP { get; set; } + /// Gets the ARM resource ID of the tracked resource being referenced. + string PublicIPSourceArmResourceId { get; set; } + /// Defines reference to a proxy resource. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference Subnet { get; set; } /// Gets the name of the proxy resource on the target side. string SubnetName { get; set; } /// Gets the ARM resource ID of the tracked resource being referenced. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.json.cs similarity index 79% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.json.cs index 72ea7d1a85af..35bbf5e8859a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NicIPConfigurationResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NicIPConfigurationResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class NicIPConfigurationResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INicIPConfigurationResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INicIPConfigurationResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new NicIPConfigurationResourceSettings(json) : null; } @@ -70,12 +70,14 @@ internal NicIPConfigurationResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.R { return; } - {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetReference.FromJson(__jsonSubnet) : Subnet;} + {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference.FromJson(__jsonSubnet) : Subnet;} + {_publicIP = If( json?.PropertyT("publicIp"), out var __jsonPublicIP) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference.FromJson(__jsonPublicIP) : PublicIP;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_loadBalancerBackendAddressPool = If( json?.PropertyT("loadBalancerBackendAddressPools"), out var __jsonLoadBalancerBackendAddressPools) ? If( __jsonLoadBalancerBackendAddressPools as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ILoadBalancerBackendAddressPoolReference) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.LoadBalancerBackendAddressPoolReference.FromJson(__u) )) ))() : null : LoadBalancerBackendAddressPool;} - {_primary = If( json?.PropertyT("primary"), out var __jsonPrimary) ? (bool?)__jsonPrimary : Primary;} {_privateIPAddress = If( json?.PropertyT("privateIpAddress"), out var __jsonPrivateIPAddress) ? (string)__jsonPrivateIPAddress : (string)PrivateIPAddress;} {_privateIPAllocationMethod = If( json?.PropertyT("privateIpAllocationMethod"), out var __jsonPrivateIPAllocationMethod) ? (string)__jsonPrivateIPAllocationMethod : (string)PrivateIPAllocationMethod;} + {_primary = If( json?.PropertyT("primary"), out var __jsonPrimary) ? (bool?)__jsonPrimary : Primary;} + {_loadBalancerBackendAddressPool = If( json?.PropertyT("loadBalancerBackendAddressPools"), out var __jsonLoadBalancerBackendAddressPools) ? If( __jsonLoadBalancerBackendAddressPools as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference.FromJson(__u) )) ))() : null : LoadBalancerBackendAddressPool;} + {_loadBalancerNatRule = If( json?.PropertyT("loadBalancerNatRules"), out var __jsonLoadBalancerNatRules) ? If( __jsonLoadBalancerNatRules as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference.FromJson(__p) )) ))() : null : LoadBalancerNatRule;} AfterFromJson(json); } @@ -100,7 +102,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } AddIf( null != this._subnet ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._subnet.ToJson(null,serializationMode) : null, "subnet" ,container.Add ); + AddIf( null != this._publicIP ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._publicIP.ToJson(null,serializationMode) : null, "publicIp" ,container.Add ); AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._privateIPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._privateIPAddress.ToString()) : null, "privateIpAddress" ,container.Add ); + AddIf( null != (((object)this._privateIPAllocationMethod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._privateIPAllocationMethod.ToString()) : null, "privateIpAllocationMethod" ,container.Add ); + AddIf( null != this._primary ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._primary) : null, "primary" ,container.Add ); if (null != this._loadBalancerBackendAddressPool) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -110,9 +116,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("loadBalancerBackendAddressPools",__w); } - AddIf( null != this._primary ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._primary) : null, "primary" ,container.Add ); - AddIf( null != (((object)this._privateIPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._privateIPAddress.ToString()) : null, "privateIpAddress" ,container.Add ); - AddIf( null != (((object)this._privateIPAllocationMethod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._privateIPAllocationMethod.ToString()) : null, "privateIpAllocationMethod" ,container.Add ); + if (null != this._loadBalancerNatRule) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); + foreach( var __s in this._loadBalancerNatRule ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("loadBalancerNatRules",__r); + } AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.PowerShell.cs similarity index 72% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/NsgReference.PowerShell.cs index 2483406e321b..c557d7ab8edc 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryProperties.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.PowerShell.cs @@ -1,10 +1,10 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - /// ClientDiscovery properties. - [System.ComponentModel.TypeConverter(typeof(OperationsDiscoveryPropertiesTypeConverter))] - public partial class OperationsDiscoveryProperties + /// Defines reference to NSG. + [System.ComponentModel.TypeConverter(typeof(NsgReferenceTypeConverter))] + public partial class NsgReference { /// @@ -48,46 +48,44 @@ public partial class OperationsDiscoveryProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new OperationsDiscoveryProperties(content); + return new NsgReference(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new OperationsDiscoveryProperties(content); + return new NsgReference(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal OperationsDiscoveryProperties(global::System.Collections.IDictionary content) + internal NsgReference(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -96,15 +94,16 @@ internal OperationsDiscoveryProperties(global::System.Collections.IDictionary co return; } // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationsDiscoveryProperties(global::System.Management.Automation.PSObject content) + internal NsgReference(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -113,6 +112,7 @@ internal OperationsDiscoveryProperties(global::System.Management.Automation.PSOb return; } // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); AfterDeserializePSObject(content); } @@ -121,9 +121,9 @@ internal OperationsDiscoveryProperties(global::System.Management.Automation.PSOb /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// ClientDiscovery properties. - [System.ComponentModel.TypeConverter(typeof(OperationsDiscoveryPropertiesTypeConverter))] - public partial interface IOperationsDiscoveryProperties + /// Defines reference to NSG. + [System.ComponentModel.TypeConverter(typeof(NsgReferenceTypeConverter))] + public partial interface INsgReference { diff --git a/src/ResourceMover/generated/api/Models/Api202101/NsgReference.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.TypeConverter.cs new file mode 100644 index 000000000000..754aba4b2275 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class NsgReferenceTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.INsgReference ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return NsgReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return NsgReference.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return NsgReference.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/NsgReference.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.cs new file mode 100644 index 000000000000..948901165133 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.cs @@ -0,0 +1,52 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines reference to NSG. + public partial class NsgReference : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReferenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference(); + + /// Gets the ARM resource ID of the tracked resource being referenced. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId = value ; } + + /// Creates an new instance. + public NsgReference() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureResourceReference), __azureResourceReference); + await eventListener.AssertObjectIsValid(nameof(__azureResourceReference), __azureResourceReference); + } + } + /// Defines reference to NSG. + public partial interface INsgReference : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference + { + + } + /// Defines reference to NSG. + internal partial interface INsgReferenceInternal : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.json.cs similarity index 83% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/NsgReference.json.cs index d8174d30a9b4..3b3edae65a33 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusProperties.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgReference.json.cs @@ -1,9 +1,9 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; - /// Class for operation result properties. - public partial class OperationStatusProperties + /// Defines reference to NSG. + public partial class NsgReference { /// @@ -47,22 +47,22 @@ public partial class OperationStatusProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new OperationStatusProperties(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new NsgReference(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. - internal OperationStatusProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + internal NsgReference(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -70,17 +70,18 @@ internal OperationStatusProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceMo { return; } + __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference(json); AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) { @@ -92,6 +93,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } + __azureResourceReference?.ToJson(container, serializationMode); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.PowerShell.cs similarity index 54% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.PowerShell.cs index c6447ae5339b..95dabb264284 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class NsgSecurityRule partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NsgSecurityRule(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NsgSecurityRule(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,21 +94,21 @@ internal NsgSecurityRule(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Access = (string) content.GetValueForProperty("Access",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Access, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationAddressPrefix = (string) content.GetValueForProperty("DestinationAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationAddressPrefix, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationPortRange = (string) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationPortRange, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Direction, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourceAddressPrefix = (string) content.GetValueForProperty("SourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourceAddressPrefix, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourcePortRange = (string) content.GetValueForProperty("SourcePortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourcePortRange, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Protocol, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Access = (string) content.GetValueForProperty("Access",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Access, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationAddressPrefix = (string) content.GetValueForProperty("DestinationAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationAddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationPortRange = (string) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationPortRange, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Direction, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Protocol, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourceAddressPrefix = (string) content.GetValueForProperty("SourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourceAddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourcePortRange = (string) content.GetValueForProperty("SourcePortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourcePortRange, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -123,16 +121,16 @@ internal NsgSecurityRule(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Description, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Access = (string) content.GetValueForProperty("Access",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Access, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationAddressPrefix = (string) content.GetValueForProperty("DestinationAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationAddressPrefix, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationPortRange = (string) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).DestinationPortRange, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Direction, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourceAddressPrefix = (string) content.GetValueForProperty("SourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourceAddressPrefix, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourcePortRange = (string) content.GetValueForProperty("SourcePortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).SourcePortRange, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal)this).Protocol, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Access = (string) content.GetValueForProperty("Access",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Access, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationAddressPrefix = (string) content.GetValueForProperty("DestinationAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationAddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationPortRange = (string) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).DestinationPortRange, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Direction, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).Protocol, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourceAddressPrefix = (string) content.GetValueForProperty("SourceAddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourceAddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourcePortRange = (string) content.GetValueForProperty("SourcePortRange",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal)this).SourcePortRange, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.TypeConverter.cs index 3afe051b09c2..a3f1c6259537 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.cs similarity index 99% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.cs rename to src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.cs index 85ea846629fb..12d3f1a0c287 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Security Rule data model for Network Security Groups. public partial class NsgSecurityRule : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRuleInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRuleInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.json.cs b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.json.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.json.cs index ea5d79042415..da3332ec4859 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/NsgSecurityRule.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/NsgSecurityRule.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class NsgSecurityRule partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.INsgSecurityRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.INsgSecurityRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new NsgSecurityRule(json) : null; } @@ -71,15 +71,15 @@ internal NsgSecurityRule(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtim return; } {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} {_access = If( json?.PropertyT("access"), out var __jsonAccess) ? (string)__jsonAccess : (string)Access;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} {_destinationAddressPrefix = If( json?.PropertyT("destinationAddressPrefix"), out var __jsonDestinationAddressPrefix) ? (string)__jsonDestinationAddressPrefix : (string)DestinationAddressPrefix;} {_destinationPortRange = If( json?.PropertyT("destinationPortRange"), out var __jsonDestinationPortRange) ? (string)__jsonDestinationPortRange : (string)DestinationPortRange;} {_direction = If( json?.PropertyT("direction"), out var __jsonDirection) ? (string)__jsonDirection : (string)Direction;} {_priority = If( json?.PropertyT("priority"), out var __jsonPriority) ? (int?)__jsonPriority : Priority;} + {_protocol = If( json?.PropertyT("protocol"), out var __jsonProtocol) ? (string)__jsonProtocol : (string)Protocol;} {_sourceAddressPrefix = If( json?.PropertyT("sourceAddressPrefix"), out var __jsonSourceAddressPrefix) ? (string)__jsonSourceAddressPrefix : (string)SourceAddressPrefix;} {_sourcePortRange = If( json?.PropertyT("sourcePortRange"), out var __jsonSourcePortRange) ? (string)__jsonSourcePortRange : (string)SourcePortRange;} - {_protocol = If( json?.PropertyT("protocol"), out var __jsonProtocol) ? (string)__jsonProtocol : (string)Protocol;} AfterFromJson(json); } @@ -103,15 +103,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); AddIf( null != (((object)this._access)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._access.ToString()) : null, "access" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); AddIf( null != (((object)this._destinationAddressPrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._destinationAddressPrefix.ToString()) : null, "destinationAddressPrefix" ,container.Add ); AddIf( null != (((object)this._destinationPortRange)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._destinationPortRange.ToString()) : null, "destinationPortRange" ,container.Add ); AddIf( null != (((object)this._direction)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._direction.ToString()) : null, "direction" ,container.Add ); AddIf( null != this._priority ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNumber((int)this._priority) : null, "priority" ,container.Add ); + AddIf( null != (((object)this._protocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._protocol.ToString()) : null, "protocol" ,container.Add ); AddIf( null != (((object)this._sourceAddressPrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sourceAddressPrefix.ToString()) : null, "sourceAddressPrefix" ,container.Add ); AddIf( null != (((object)this._sourcePortRange)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sourcePortRange.ToString()) : null, "sourcePortRange" ,container.Add ); - AddIf( null != (((object)this._protocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._protocol.ToString()) : null, "protocol" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.PowerShell.cs similarity index 64% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.PowerShell.cs index 2d707865ae06..9a0062f51026 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class OperationErrorAdditionalInfo partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationErrorAdditionalInfo(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationErrorAdditionalInfo(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,14 +96,14 @@ internal OperationErrorAdditionalInfo(global::System.Collections.IDictionary con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveErrorInfoTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[]) content.GetValueForProperty("InfoMoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveErrorInfoTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[]) content.GetValueForProperty("InfoMoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResourceTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -116,9 +116,9 @@ internal OperationErrorAdditionalInfo(global::System.Management.Automation.PSObj return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveErrorInfoTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[]) content.GetValueForProperty("InfoMoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AffectedMoveResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveErrorInfoTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[]) content.GetValueForProperty("InfoMoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal)this).InfoMoveResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AffectedMoveResourceTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.TypeConverter.cs index 34feefa2c4d8..d6ce676d1442 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.cs similarity index 66% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.cs index 11f6e7b11639..aa7790197992 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.cs @@ -1,32 +1,32 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// The operation error info. public partial class OperationErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo _info; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo _info; /// The operation error info. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveErrorInfo()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveErrorInfo()); } /// The affected move resources. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] InfoMoveResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal)Info).MoveResource; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] InfoMoveResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal)Info).MoveResource; } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveErrorInfo()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveErrorInfo()); set { {_info = value;} } } /// Internal Acessors for InfoMoveResource - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal.InfoMoveResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal)Info).MoveResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfoInternal)Info).MoveResource = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal.InfoMoveResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal)Info).MoveResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfoInternal)Info).MoveResource = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -51,8 +51,8 @@ public partial interface IOperationErrorAdditionalInfo : ReadOnly = true, Description = @"The affected move resources.", SerializedName = @"moveResources", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] InfoMoveResource { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] InfoMoveResource { get; } /// The error type. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -68,9 +68,9 @@ internal partial interface IOperationErrorAdditionalInfoInternal { /// The operation error info. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveErrorInfo Info { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveErrorInfo Info { get; set; } /// The affected move resources. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAffectedMoveResource[] InfoMoveResource { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAffectedMoveResource[] InfoMoveResource { get; set; } /// The error type. string Type { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.json.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.json.cs index 9557cbd91572..1febc16d05d9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationErrorAdditionalInfo.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationErrorAdditionalInfo.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class OperationErrorAdditionalInfo partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new OperationErrorAdditionalInfo(json) : null; } @@ -70,7 +70,7 @@ internal OperationErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Resourc { return; } - {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveErrorInfo.FromJson(__jsonInfo) : Info;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveErrorInfo.FromJson(__jsonInfo) : Info;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.PowerShell.cs new file mode 100644 index 000000000000..01bec3d81126 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.PowerShell.cs @@ -0,0 +1,151 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Operation status REST resource. + [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] + public partial class OperationStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationStatus(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.ResourceMover.Models.Api202101.IOperationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationStatus(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.ResourceMover.Models.Api202101.IOperationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).StartTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).EndTime = (string) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).EndTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationErrorAdditionalInfoTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).StartTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).EndTime = (string) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).EndTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationErrorAdditionalInfoTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Operation status REST resource. + [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] + public partial interface IOperationStatus + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationStatus.TypeConverter.cs index ff564a91d43d..4aa881f6b12c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.cs similarity index 70% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationStatus.cs index 55305b538b47..356cf49729f6 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.cs @@ -1,25 +1,25 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Operation status REST resource. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.DoNotFormat] public partial class OperationStatus : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal { /// The additional info. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).AdditionalInfo; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Detail; } /// Backing field for property. private string _endTime; @@ -29,11 +29,11 @@ public partial class OperationStatus : public string EndTime { get => this._endTime; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError _error; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError _error; /// Error stating all error details for the operation. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusError()); } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusError()); } /// Backing field for property. private string _id; @@ -44,40 +44,40 @@ public partial class OperationStatus : /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).AdditionalInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Detail = value; } /// Internal Acessors for EndTime - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusError()); set { {_error = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)Error).Message = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any()); set { {_property = value;} } } /// Internal Acessors for StartTime - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusInternal.Status { get => this._status; set { {_status = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusInternal.Status { get => this._status; set { {_status = value;} } } /// Backing field for property. private string _name; @@ -87,11 +87,11 @@ public partial class OperationStatus : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny _property; /// Custom data. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties()); } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any()); } /// Backing field for property. private string _startTime; @@ -126,8 +126,8 @@ public partial interface IOperationStatus : ReadOnly = true, Description = @"The additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -142,8 +142,8 @@ public partial interface IOperationStatus : ReadOnly = true, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Detail { get; } /// End time. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -182,8 +182,8 @@ public partial interface IOperationStatus : ReadOnly = true, Description = @"Custom data.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties Property { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny Property { get; } /// Start time. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -210,15 +210,15 @@ internal partial interface IOperationStatusInternal { /// The additional info. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] AdditionalInfo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Detail { get; set; } /// End time. string EndTime { get; set; } /// Error stating all error details for the operation. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError Error { get; set; } /// Resource Id. string Id { get; set; } /// The error message. @@ -226,7 +226,7 @@ internal partial interface IOperationStatusInternal /// Operation name. string Name { get; set; } /// Custom data. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny Property { get; set; } /// Start time. string StartTime { get; set; } /// diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.json.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationStatus.json.cs index 4e6d74b1c521..3c9a641ba98e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatus.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatus.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class OperationStatus partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new OperationStatus(json) : null; } @@ -70,13 +70,13 @@ internal OperationStatus(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtim { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusError.FromJson(__jsonError) : Error;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? (string)__jsonEndTime : (string)EndTime;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusError.FromJson(__jsonError) : Error;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties.FromJson(__jsonProperties) : Property;} - {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? (string)__jsonStartTime : (string)StartTime;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? (string)__jsonStartTime : (string)StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? (string)__jsonEndTime : (string)EndTime;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } @@ -105,27 +105,27 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._endTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._endTime.ToString()) : null, "endTime" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != (((object)this._startTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._startTime.ToString()) : null, "startTime" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._startTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._startTime.ToString()) : null, "startTime" ,container.Add ); + AddIf( null != (((object)this._endTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._endTime.ToString()) : null, "endTime" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); } AfterToJson(ref container); return container; diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.PowerShell.cs similarity index 60% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.PowerShell.cs index a3abc5cb4898..7766fdaf4f4a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class OperationStatusError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationStatusError(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationStatusError(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,15 +94,15 @@ internal OperationStatusError(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationErrorAdditionalInfoTypeConverter.ConvertFrom)); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,10 +115,10 @@ internal OperationStatusError(global::System.Management.Automation.PSObject cont return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationErrorAdditionalInfoTypeConverter.ConvertFrom)); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.TypeConverter.cs index cd3cb95ba563..f2a197ec4a9a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.cs similarity index 75% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.cs index 42832f0d5089..70f6eaee0737 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.cs @@ -1,19 +1,19 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Class for operation status errors. public partial class OperationStatusError : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] _additionalInfo; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] _additionalInfo; /// The additional info. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } /// Backing field for property. private string _code; @@ -23,11 +23,11 @@ public partial class OperationStatusError : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Detail { get => this._detail; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Detail { get => this._detail; } /// Backing field for property. private string _message; @@ -37,16 +37,16 @@ public partial class OperationStatusError : public string Message { get => this._message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal.Detail { get => this._detail; set { {_detail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusErrorInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusErrorInternal.Message { get => this._message; set { {_message = value;} } } /// Creates an new instance. public OperationStatusError() @@ -64,8 +64,8 @@ public partial interface IOperationStatusError : ReadOnly = true, Description = @"The additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -80,8 +80,8 @@ public partial interface IOperationStatusError : ReadOnly = true, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -97,11 +97,11 @@ internal partial interface IOperationStatusErrorInternal { /// The additional info. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo[] AdditionalInfo { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo[] AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError[] Detail { get; set; } /// The error message. string Message { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.json.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.json.cs similarity index 85% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.json.cs index db4c3fc5f5a3..bf2bc92e1331 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationStatusError.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationStatusError.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class OperationStatusError partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new OperationStatusError(json) : null; } @@ -70,10 +70,10 @@ internal OperationStatusError(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.R { return; } - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfo.FromJson(__u) )) ))() : null : AdditionalInfo;} {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatusError) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusError.FromJson(__p) )) ))() : null : Detail;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatusError) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatusError.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} AfterFromJson(json); } @@ -97,18 +97,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._additionalInfo) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); - foreach( var __x in this._additionalInfo ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("additionalInfo",__w); - } - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } @@ -119,13 +107,25 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); - foreach( var __s in this._detail ) + foreach( var __s in this._additionalInfo ) { AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); } - container.Add("details",__r); + container.Add("additionalInfo",__r); } } AfterToJson(ref container); diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.PowerShell.cs similarity index 55% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.PowerShell.cs index e86e3c7b1c76..49ec98ee298f 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class OperationsDiscovery partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationsDiscovery(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationsDiscovery(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,19 +94,20 @@ internal OperationsDiscovery(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.DisplayTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Origin, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayDescription, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayOperation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayProvider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.DisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayDescription, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -121,14 +120,15 @@ internal OperationsDiscovery(global::System.Management.Automation.PSObject conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.DisplayTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Origin, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayDescription, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayOperation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayProvider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.DisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal)this).DisplayDescription, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.TypeConverter.cs index 34a2daf0849c..2fbef3ca6a7e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.cs similarity index 87% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.cs index 225a0b5ee254..cd6151c93818 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.cs @@ -1,15 +1,15 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Operations discovery class. public partial class OperationsDiscovery : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay _display; /// /// Contains the localized display information for this particular operation / action. These @@ -19,7 +19,7 @@ public partial class OperationsDiscovery : /// (3) audit history / records for management operations. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Display()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Display()); set => this._display = value; } /// /// Gets or sets the description. @@ -36,7 +36,7 @@ public partial class OperationsDiscovery : /// 'display.resource' 'ActionName' any 'display.resources'. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Description = value; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Description = value ?? null; } /// /// Gets or sets the operation. @@ -46,7 +46,7 @@ public partial class OperationsDiscovery : /// Prescriptive guidance: Read Create or Update Delete 'ActionName'. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Operation = value; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Operation = value ?? null; } /// /// Gets or sets the provider. @@ -56,7 +56,7 @@ public partial class OperationsDiscovery : /// e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Provider = value; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Provider = value ?? null; } /// /// Gets or sets the resource. @@ -69,10 +69,17 @@ public partial class OperationsDiscovery : /// or "Scheduler Jobs". /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplayInternal)Display).Resource = value; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplayInternal)Display).Resource = value ?? null; } + + /// Backing field for property. + private bool? _isDataAction; + + /// Indicates whether the operation is a data action + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; set => this._isDataAction = value; } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Display()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Display()); set { {_display = value;} } } /// Backing field for property. private string _name; @@ -117,11 +124,11 @@ public partial class OperationsDiscovery : public string Origin { get => this._origin; set => this._origin = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny _property; - /// ClientDiscovery properties. + /// Any object [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryProperties()); set => this._property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any()); set => this._property = value; } /// Creates an new instance. public OperationsDiscovery() @@ -225,6 +232,14 @@ It should use Title Casing. SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] string DisplayResource { get; set; } + /// Indicates whether the operation is a data action + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the operation is a data action", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; set; } /// /// Gets or sets Name of the API. /// The name of the operation being performed on this particular object. It should @@ -293,14 +308,14 @@ RBAC UX and the audit logs UX. SerializedName = @"origin", PossibleTypes = new [] { typeof(string) })] string Origin { get; set; } - /// ClientDiscovery properties. + /// Any object [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, - Description = @"ClientDiscovery properties.", + Description = @"Any object", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties Property { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny Property { get; set; } } /// Operations discovery class. @@ -314,7 +329,7 @@ internal partial interface IOperationsDiscoveryInternal /// (2) complex query filters for the event service; and /// (3) audit history / records for management operations. /// - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDisplay Display { get; set; } /// /// Gets or sets the description. /// The localized friendly description for the operation, as it should be shown to the @@ -357,6 +372,8 @@ internal partial interface IOperationsDiscoveryInternal /// or "Scheduler Jobs". /// string DisplayResource { get; set; } + /// Indicates whether the operation is a data action + bool? IsDataAction { get; set; } /// /// Gets or sets Name of the API. /// The name of the operation being performed on this particular object. It should @@ -389,8 +406,8 @@ internal partial interface IOperationsDiscoveryInternal /// Default value is "user,system". /// string Origin { get; set; } - /// ClientDiscovery properties. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryProperties Property { get; set; } + /// Any object + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IAny Property { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.json.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.json.cs similarity index 90% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.json.cs index 83d423c605ee..55475a014afe 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscovery.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscovery.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class OperationsDiscovery partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new OperationsDiscovery(json) : null; } @@ -70,10 +70,11 @@ internal OperationsDiscovery(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Ru { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Display.FromJson(__jsonDisplay) : Display;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Display.FromJson(__jsonDisplay) : Display;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } @@ -98,6 +99,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.PowerShell.cs similarity index 70% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.PowerShell.cs index 41bffbc3c3b2..a4ad2699288e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class OperationsDiscoveryCollection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationsDiscoveryCollection(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationsDiscoveryCollection(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +96,13 @@ internal OperationsDiscoveryCollection(global::System.Collections.IDictionary co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).NextLink, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +115,8 @@ internal OperationsDiscoveryCollection(global::System.Management.Automation.PSOb return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal)this).NextLink, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.TypeConverter.cs index 4439e633f066..d234cff90353 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.cs similarity index 84% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.cs index 43596327756e..369de49e5ebb 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Collection of ClientDiscovery details. public partial class OperationsDiscoveryCollection : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollectionInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollectionInternal { /// Backing field for property. @@ -16,11 +16,11 @@ public partial class OperationsDiscoveryCollection : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery[] _value; /// Gets or sets the ClientDiscovery details. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public OperationsDiscoveryCollection() @@ -46,8 +46,8 @@ public partial interface IOperationsDiscoveryCollection : ReadOnly = false, Description = @"Gets or sets the ClientDiscovery details.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery[] Value { get; set; } } /// Collection of ClientDiscovery details. @@ -57,7 +57,7 @@ internal partial interface IOperationsDiscoveryCollectionInternal /// Gets or sets the value of next link. string NextLink { get; set; } /// Gets or sets the ClientDiscovery details. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery[] Value { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.json.cs b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.json.cs similarity index 91% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.json.cs index 4a3cec1bb78d..ecee5d61a600 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/OperationsDiscoveryCollection.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/OperationsDiscoveryCollection.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class OperationsDiscoveryCollection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscoveryCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscoveryCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new OperationsDiscoveryCollection(json) : null; } @@ -70,8 +70,8 @@ internal OperationsDiscoveryCollection(Microsoft.Azure.PowerShell.Cmdlets.Resour { return; } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationsDiscovery) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscovery.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationsDiscovery) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscovery.FromJson(__u) )) ))() : null : Value;} AfterFromJson(json); } @@ -94,7 +94,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -104,6 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("value",__w); } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.PowerShell.cs similarity index 68% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.PowerShell.cs index bcce53786552..53d199586794 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class PrepareRequest partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrepareRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrepareRequest(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,14 +94,14 @@ internal PrepareRequest(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -116,9 +114,9 @@ internal PrepareRequest(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.TypeConverter.cs index a58809d23a50..2be95b12bd4c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.cs b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.cs similarity index 98% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.cs rename to src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.cs index 248971e7b89f..07eafb2bba18 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the request body for initiate prepare operation. public partial class PrepareRequest : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequestInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.json.cs b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.json.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.json.cs index 58163dfc8c20..7cd2c110a176 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PrepareRequest.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PrepareRequest.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class PrepareRequest partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new PrepareRequest(json) : null; } @@ -70,9 +70,9 @@ internal PrepareRequest(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime { return; } - {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} - {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} {_validateOnly = If( json?.PropertyT("validateOnly"), out var __jsonValidateOnly) ? (bool?)__jsonValidateOnly : ValidateOnly;} + {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} + {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} AfterFromJson(json); } @@ -95,7 +95,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); + AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); if (null != this._moveResource) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -105,7 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("moveResources",__w); } - AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); + AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.PowerShell.cs similarity index 75% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.PowerShell.cs index 4961dc902f64..14e3b77a853d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class ProxyResourceReference partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProxyResourceReference(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProxyResourceReference(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +94,13 @@ internal ProxyResourceReference(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +113,8 @@ internal ProxyResourceReference(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.TypeConverter.cs index 47afba51cb6c..30cbb73eb170 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.cs b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.cs similarity index 80% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.cs rename to src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.cs index 16cbc2682ef8..f7206859cb26 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.cs @@ -1,18 +1,18 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines reference to a proxy resource. public partial class ProxyResourceReference : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AzureResourceReference(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference(); /// Backing field for property. private string _name; @@ -23,7 +23,7 @@ public partial class ProxyResourceReference : /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId = value; } + public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId = value ; } /// Creates an new instance. public ProxyResourceReference() @@ -46,7 +46,7 @@ public ProxyResourceReference() /// Defines reference to a proxy resource. public partial interface IProxyResourceReference : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference { /// Gets the name of the proxy resource on the target side. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -60,7 +60,7 @@ public partial interface IProxyResourceReference : } /// Defines reference to a proxy resource. internal partial interface IProxyResourceReferenceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal { /// Gets the name of the proxy resource on the target side. string Name { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.json.cs b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.json.cs index 372967dab61e..c5ba085224f2 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ProxyResourceReference.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ProxyResourceReference.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class ProxyResourceReference partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new ProxyResourceReference(json) : null; } @@ -70,7 +70,7 @@ internal ProxyResourceReference(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover { return; } - __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.AzureResourceReference(json); + __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference(json); {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.PowerShell.cs similarity index 59% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.PowerShell.cs index b4fb8ab97db7..de258a3ecee0 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class PublicIPAddressResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PublicIPAddressResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PublicIPAddressResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,18 +96,18 @@ internal PublicIPAddressResourceSettings(global::System.Collections.IDictionary return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel = (string) content.GetValueForProperty("DomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).FQdn = (string) content.GetValueForProperty("FQdn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).FQdn, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod = (string) content.GetValueForProperty("PublicIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Sku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Zone, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel = (string) content.GetValueForProperty("DomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Fqdn, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod = (string) content.GetValueForProperty("PublicIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Sku, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Zone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -120,13 +120,13 @@ internal PublicIPAddressResourceSettings(global::System.Management.Automation.PS return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel = (string) content.GetValueForProperty("DomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).FQdn = (string) content.GetValueForProperty("FQdn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).FQdn, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod = (string) content.GetValueForProperty("PublicIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Sku, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal)this).Zone, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel = (string) content.GetValueForProperty("DomainNameLabel",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).DomainNameLabel, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Fqdn, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod = (string) content.GetValueForProperty("PublicIPAllocationMethod",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).PublicIPAllocationMethod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Sku, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Zone = (string) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal)this).Zone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.TypeConverter.cs index 20390e88bacf..fd91b4db985e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.cs similarity index 84% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.cs index 505db39404e0..04a8e3622884 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.cs @@ -1,18 +1,18 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the public IP address resource settings. public partial class PublicIPAddressResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// Backing field for property. private string _domainNameLabel; @@ -21,12 +21,12 @@ public partial class PublicIPAddressResourceSettings : [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] public string DomainNameLabel { get => this._domainNameLabel; set => this._domainNameLabel = value; } - /// Backing field for property. - private string _fQdn; + /// Backing field for property. + private string _fqdn; /// Gets or sets the fully qualified domain name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public string FQdn { get => this._fQdn; set => this._fQdn = value; } + public string Fqdn { get => this._fqdn; set => this._fqdn = value; } /// Backing field for property. private string _publicIPAllocationMethod; @@ -39,7 +39,7 @@ public partial class PublicIPAddressResourceSettings : /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Backing field for property. private string _sku; @@ -50,7 +50,7 @@ public partial class PublicIPAddressResourceSettings : /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Backing field for property. private string _zone; @@ -80,7 +80,7 @@ public PublicIPAddressResourceSettings() /// Defines the public IP address resource settings. public partial interface IPublicIPAddressResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Gets or sets the domain name label. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -95,9 +95,9 @@ public partial interface IPublicIPAddressResourceSettings : Required = false, ReadOnly = false, Description = @"Gets or sets the fully qualified domain name.", - SerializedName = @"fQDN", + SerializedName = @"fqdn", PossibleTypes = new [] { typeof(string) })] - string FQdn { get; set; } + string Fqdn { get; set; } /// Gets or sets public IP allocation method. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, @@ -126,12 +126,12 @@ public partial interface IPublicIPAddressResourceSettings : } /// Defines the public IP address resource settings. internal partial interface IPublicIPAddressResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Gets or sets the domain name label. string DomainNameLabel { get; set; } /// Gets or sets the fully qualified domain name. - string FQdn { get; set; } + string Fqdn { get; set; } /// Gets or sets public IP allocation method. string PublicIPAllocationMethod { get; set; } /// Gets or sets public IP sku. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.json.cs similarity index 92% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.json.cs index ebccf4078f5f..b91dae6c3780 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/PublicIPAddressResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPAddressResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class PublicIPAddressResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPublicIPAddressResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPAddressResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new PublicIPAddressResourceSettings(json) : null; } @@ -70,9 +70,9 @@ internal PublicIPAddressResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Reso { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); {_domainNameLabel = If( json?.PropertyT("domainNameLabel"), out var __jsonDomainNameLabel) ? (string)__jsonDomainNameLabel : (string)DomainNameLabel;} - {_fQdn = If( json?.PropertyT("fQDN"), out var __jsonFQdn) ? (string)__jsonFQdn : (string)FQdn;} + {_fqdn = If( json?.PropertyT("fqdn"), out var __jsonFqdn) ? (string)__jsonFqdn : (string)Fqdn;} {_publicIPAllocationMethod = If( json?.PropertyT("publicIpAllocationMethod"), out var __jsonPublicIPAllocationMethod) ? (string)__jsonPublicIPAllocationMethod : (string)PublicIPAllocationMethod;} {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? (string)__jsonSku : (string)Sku;} {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? (string)__jsonZones : (string)Zone;} @@ -100,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } __resourceSettings?.ToJson(container, serializationMode); AddIf( null != (((object)this._domainNameLabel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._domainNameLabel.ToString()) : null, "domainNameLabel" ,container.Add ); - AddIf( null != (((object)this._fQdn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._fQdn.ToString()) : null, "fQDN" ,container.Add ); + AddIf( null != (((object)this._fqdn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._fqdn.ToString()) : null, "fqdn" ,container.Add ); AddIf( null != (((object)this._publicIPAllocationMethod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._publicIPAllocationMethod.ToString()) : null, "publicIpAllocationMethod" ,container.Add ); AddIf( null != (((object)this._sku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._sku.ToString()) : null, "sku" ,container.Add ); AddIf( null != (((object)this._zone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._zone.ToString()) : null, "zones" ,container.Add ); diff --git a/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.PowerShell.cs new file mode 100644 index 000000000000..33234350b8ca --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.PowerShell.cs @@ -0,0 +1,131 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines reference to a public IP. + [System.ComponentModel.TypeConverter(typeof(PublicIPReferenceTypeConverter))] + public partial class PublicIPReference + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PublicIPReference(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.ResourceMover.Models.Api202101.IPublicIPReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PublicIPReference(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.ResourceMover.Models.Api202101.IPublicIPReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PublicIPReference(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, 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 PublicIPReference(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines reference to a public IP. + [System.ComponentModel.TypeConverter(typeof(PublicIPReferenceTypeConverter))] + public partial interface IPublicIPReference + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.TypeConverter.cs new file mode 100644 index 000000000000..e7596f51c761 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PublicIPReferenceTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.IPublicIPReference ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPReference).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PublicIPReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PublicIPReference.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PublicIPReference.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.cs new file mode 100644 index 000000000000..63be6a15ff73 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.cs @@ -0,0 +1,52 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines reference to a public IP. + public partial class PublicIPReference : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPReference, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPReferenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference(); + + /// Gets the ARM resource ID of the tracked resource being referenced. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] + public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__azureResourceReference).SourceArmResourceId = value ; } + + /// Creates an new instance. + public PublicIPReference() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureResourceReference), __azureResourceReference); + await eventListener.AssertObjectIsValid(nameof(__azureResourceReference), __azureResourceReference); + } + } + /// Defines reference to a public IP. + public partial interface IPublicIPReference : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference + { + + } + /// Defines reference to a public IP. + internal partial interface IPublicIPReferenceInternal : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.json.cs b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.json.cs new file mode 100644 index 000000000000..f356ff19707d --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/PublicIPReference.json.cs @@ -0,0 +1,101 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines reference to a public IP. + public partial class PublicIPReference + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPReference. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPReference. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPublicIPReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new PublicIPReference(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal PublicIPReference(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureResourceReference?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.PowerShell.cs new file mode 100644 index 000000000000..c6ab34292eb6 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.PowerShell.cs @@ -0,0 +1,133 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Required for resources collection. + [System.ComponentModel.TypeConverter(typeof(RequiredForResourcesCollectionTypeConverter))] + public partial class RequiredForResourcesCollection + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RequiredForResourcesCollection(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.ResourceMover.Models.Api202101.IRequiredForResourcesCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RequiredForResourcesCollection(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.ResourceMover.Models.Api202101.IRequiredForResourcesCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RequiredForResourcesCollection(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollectionInternal)this).SourceId = (string[]) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollectionInternal)this).SourceId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RequiredForResourcesCollection(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollectionInternal)this).SourceId = (string[]) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollectionInternal)this).SourceId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Required for resources collection. + [System.ComponentModel.TypeConverter(typeof(RequiredForResourcesCollectionTypeConverter))] + public partial interface IRequiredForResourcesCollection + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.TypeConverter.cs new file mode 100644 index 000000000000..a33bed23c7aa --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RequiredForResourcesCollectionTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.IRequiredForResourcesCollection ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollection).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RequiredForResourcesCollection.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RequiredForResourcesCollection.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RequiredForResourcesCollection.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.cs b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.cs new file mode 100644 index 000000000000..160fe896917c --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.cs @@ -0,0 +1,46 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Required for resources collection. + public partial class RequiredForResourcesCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollection, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollectionInternal + { + + /// Backing field for property. + private string[] _sourceId; + + /// Gets or sets the list of source Ids for which the input resource is required. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string[] SourceId { get => this._sourceId; set => this._sourceId = value; } + + /// Creates an new instance. + public RequiredForResourcesCollection() + { + + } + } + /// Required for resources collection. + public partial interface IRequiredForResourcesCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// Gets or sets the list of source Ids for which the input resource is required. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the list of source Ids for which the input resource is required.", + SerializedName = @"sourceIds", + PossibleTypes = new [] { typeof(string) })] + string[] SourceId { get; set; } + + } + /// Required for resources collection. + internal partial interface IRequiredForResourcesCollectionInternal + + { + /// Gets or sets the list of source Ids for which the input resource is required. + string[] SourceId { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.json.cs b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.json.cs new file mode 100644 index 000000000000..b2f6568af96d --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/RequiredForResourcesCollection.json.cs @@ -0,0 +1,109 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Required for resources collection. + public partial class RequiredForResourcesCollection + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IRequiredForResourcesCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new RequiredForResourcesCollection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal RequiredForResourcesCollection(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sourceId = If( json?.PropertyT("sourceIds"), out var __jsonSourceIds) ? If( __jsonSourceIds as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : SourceId;} + 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.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._sourceId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); + foreach( var __x in this._sourceId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("sourceIds",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.PowerShell.cs similarity index 76% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.PowerShell.cs index 19c543df71d7..58723e4f961b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class ResourceGroupResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceGroupResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceGroupResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +96,13 @@ internal ResourceGroupResourceSettings(global::System.Collections.IDictionary co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +115,8 @@ internal ResourceGroupResourceSettings(global::System.Management.Automation.PSOb return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.TypeConverter.cs index f48d99ec0394..36267bb2d8ab 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.cs similarity index 73% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.cs index 6cc16a5bc836..94dd072ba89e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.cs @@ -1,28 +1,28 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the resource group resource settings. public partial class ResourceGroupResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Creates an new instance. public ResourceGroupResourceSettings() @@ -45,13 +45,13 @@ public ResourceGroupResourceSettings() /// Defines the resource group resource settings. public partial interface IResourceGroupResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { } /// Defines the resource group resource settings. internal partial interface IResourceGroupResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.json.cs index 3dba64e2ed4a..e5916b29f44d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceGroupResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceGroupResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class ResourceGroupResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceGroupResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceGroupResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new ResourceGroupResourceSettings(json) : null; } @@ -70,7 +70,7 @@ internal ResourceGroupResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Resour { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.PowerShell.cs similarity index 68% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.PowerShell.cs index dd8ddeb9a2e9..061bcd829669 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class ResourceMoveRequest partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceMoveRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceMoveRequest(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,14 +94,14 @@ internal ResourceMoveRequest(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -116,9 +114,9 @@ internal ResourceMoveRequest(global::System.Management.Automation.PSObject conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).ValidateOnly = (bool?) content.GetValueForProperty("ValidateOnly",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).ValidateOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResource = (string[]) content.GetValueForProperty("MoveResource",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResource, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResourceInputType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType?) content.GetValueForProperty("MoveResourceInputType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal)this).MoveResourceInputType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType.CreateFrom); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.TypeConverter.cs index 414c9bc0c118..68150320e56f 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.cs index 1799b299f623..46758e82f137 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the request body for resource move operation. public partial class ResourceMoveRequest : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequestInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.json.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.json.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.json.cs index 86d84f3edf76..5efe48bbce6d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceMoveRequest.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceMoveRequest.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class ResourceMoveRequest partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new ResourceMoveRequest(json) : null; } @@ -70,9 +70,9 @@ internal ResourceMoveRequest(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Ru { return; } - {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} - {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} {_validateOnly = If( json?.PropertyT("validateOnly"), out var __jsonValidateOnly) ? (bool?)__jsonValidateOnly : ValidateOnly;} + {_moveResource = If( json?.PropertyT("moveResources"), out var __jsonMoveResources) ? If( __jsonMoveResources as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MoveResource;} + {_moveResourceInputType = If( json?.PropertyT("moveResourceInputType"), out var __jsonMoveResourceInputType) ? (string)__jsonMoveResourceInputType : (string)MoveResourceInputType;} AfterFromJson(json); } @@ -95,7 +95,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); + AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); if (null != this._moveResource) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -105,7 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("moveResources",__w); } - AddIf( null != this._validateOnly ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._validateOnly) : null, "validateOnly" ,container.Add ); + AddIf( null != (((object)this._moveResourceInputType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceInputType.ToString()) : null, "moveResourceInputType" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.PowerShell.cs similarity index 76% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.PowerShell.cs index 91feacbd743a..71672d37e139 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class ResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceSettings(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +94,13 @@ internal ResourceSettings(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +113,8 @@ internal ResourceSettings(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.TypeConverter.cs index 011a462a8103..2dd7aedf93e2 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.cs index f9d7c9c25209..1d3cb2e61ce2 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Gets or sets the resource settings. public partial class ResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.json.cs index 5ebed09840a8..658b6ebc3225 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/ResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/ResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,15 +47,15 @@ public partial class ResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings interface is polymorphic, + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings 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.ResourceMover.Models.Api20191001Preview.IResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json)) { @@ -65,6 +65,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 switch ( json.StringProperty("resourceType") ) { + case "Microsoft.Compute/virtualMachines": + { + return new VirtualMachineResourceSettings(json); + } case "Microsoft.Compute/availabilitySets": { return new AvailabilitySetResourceSettings(json); @@ -105,13 +109,13 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 { return new PublicIPAddressResourceSettings(json); } - case "MoveResourceProperties-sourceResourceSettings": + case "Microsoft.KeyVault/vaults": { - return new MoveResourcePropertiesSourceResourceSettings(json); + return new KeyVaultResourceSettings(json); } - case "Microsoft.Compute/virtualMachines": + case "Microsoft.Compute/diskEncryptionSets": { - return new VirtualMachineResourceSettings(json); + return new DiskEncryptionSetResourceSettings(json); } } return new ResourceSettings(json); diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.PowerShell.cs similarity index 70% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.PowerShell.cs index 6b8bd775e55c..6cbf6a8a2070 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class SqlDatabaseResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SqlDatabaseResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SqlDatabaseResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,14 +96,14 @@ internal SqlDatabaseResourceSettings(global::System.Collections.IDictionary cont return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -116,9 +116,9 @@ internal SqlDatabaseResourceSettings(global::System.Management.Automation.PSObje return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.TypeConverter.cs index e2b3f162f2c8..5e7b73732c85 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.cs similarity index 79% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.cs index 0e30fe83c5fa..ca1f11f3ebb9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.cs @@ -1,28 +1,28 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the Sql Database resource settings. public partial class SqlDatabaseResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant? _zoneRedundant; @@ -52,7 +52,7 @@ public SqlDatabaseResourceSettings() /// Defines the Sql Database resource settings. public partial interface ISqlDatabaseResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Defines the zone redundant resource setting. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -66,7 +66,7 @@ public partial interface ISqlDatabaseResourceSettings : } /// Defines the Sql Database resource settings. internal partial interface ISqlDatabaseResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Defines the zone redundant resource setting. Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant? ZoneRedundant { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.json.cs index e4c9647b4b4b..3459d6a2d470 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlDatabaseResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlDatabaseResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class SqlDatabaseResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlDatabaseResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlDatabaseResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new SqlDatabaseResourceSettings(json) : null; } @@ -70,7 +70,7 @@ internal SqlDatabaseResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Resource { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); {_zoneRedundant = If( json?.PropertyT("zoneRedundant"), out var __jsonZoneRedundant) ? (string)__jsonZoneRedundant : (string)ZoneRedundant;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.PowerShell.cs similarity index 70% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.PowerShell.cs index 33c7a62de776..5a749678681f 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class SqlElasticPoolResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SqlElasticPoolResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SqlElasticPoolResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,14 +96,14 @@ internal SqlElasticPoolResourceSettings(global::System.Collections.IDictionary c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -116,9 +116,9 @@ internal SqlElasticPoolResourceSettings(global::System.Management.Automation.PSO return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettingsInternal)this).ZoneRedundant, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.TypeConverter.cs index b38b1a0b5d9a..d8989f29efb5 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.cs similarity index 79% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.cs index d5bb97b78de3..85c873b6cba6 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.cs @@ -1,28 +1,28 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the Sql ElasticPool resource settings. public partial class SqlElasticPoolResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant? _zoneRedundant; @@ -52,7 +52,7 @@ public SqlElasticPoolResourceSettings() /// Defines the Sql ElasticPool resource settings. public partial interface ISqlElasticPoolResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Defines the zone redundant resource setting. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -66,7 +66,7 @@ public partial interface ISqlElasticPoolResourceSettings : } /// Defines the Sql ElasticPool resource settings. internal partial interface ISqlElasticPoolResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Defines the zone redundant resource setting. Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundant? ZoneRedundant { get; set; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.json.cs index cad567ec87c2..d50c5803177e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlElasticPoolResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlElasticPoolResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class SqlElasticPoolResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlElasticPoolResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlElasticPoolResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new SqlElasticPoolResourceSettings(json) : null; } @@ -70,7 +70,7 @@ internal SqlElasticPoolResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Resou { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); {_zoneRedundant = If( json?.PropertyT("zoneRedundant"), out var __jsonZoneRedundant) ? (string)__jsonZoneRedundant : (string)ZoneRedundant;} AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.PowerShell.cs similarity index 76% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.PowerShell.cs index 87fbb242cce9..d3986930d9fc 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class SqlServerResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SqlServerResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SqlServerResourceSettings(content); } @@ -80,10 +80,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +96,13 @@ internal SqlServerResourceSettings(global::System.Collections.IDictionary conten return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +115,8 @@ internal SqlServerResourceSettings(global::System.Management.Automation.PSObject return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.TypeConverter.cs index 0cdc5a130e7a..0da2ef7ac6b0 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.cs similarity index 72% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.cs index ab67b5abda34..ab200004ad9e 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.cs @@ -1,28 +1,28 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the SQL Server resource settings. public partial class SqlServerResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Creates an new instance. public SqlServerResourceSettings() @@ -45,13 +45,13 @@ public SqlServerResourceSettings() /// Defines the SQL Server resource settings. public partial interface ISqlServerResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { } /// Defines the SQL Server resource settings. internal partial interface ISqlServerResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.json.cs index 2338cc7a54a2..65498aeb0ff1 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SqlServerResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SqlServerResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class SqlServerResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISqlServerResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISqlServerResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new SqlServerResourceSettings(json) : null; } @@ -70,7 +70,7 @@ internal SqlServerResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMo { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.PowerShell.cs similarity index 76% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/SubnetReference.PowerShell.cs index dfe3314f52c7..accc33ab9829 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class SubnetReference partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SubnetReference(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SubnetReference(content); } @@ -80,10 +78,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +94,13 @@ internal SubnetReference(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -115,8 +113,8 @@ internal SubnetReference(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId = (string) content.GetValueForProperty("SourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)this).SourceArmResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)this).Name, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/SubnetReference.TypeConverter.cs index 2f4e94c3c562..8605946a4494 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.cs similarity index 71% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.cs rename to src/ResourceMover/generated/api/Models/Api202101/SubnetReference.cs index d0177e9300c7..c1f1562106c2 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.cs @@ -1,26 +1,26 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines reference to subnet. public partial class SubnetReference : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReferenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReferenceInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference(); /// Gets the name of the proxy resource on the target side. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)__proxyResourceReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal)__proxyResourceReference).Name = value; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)__proxyResourceReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal)__proxyResourceReference).Name = value ?? null; } /// Gets the ARM resource ID of the tracked resource being referenced. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId = value; } + public string SourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)__proxyResourceReference).SourceArmResourceId = value ; } /// Creates an new instance. public SubnetReference() @@ -43,13 +43,13 @@ public SubnetReference() /// Defines reference to subnet. public partial interface ISubnetReference : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReference + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReference { } /// Defines reference to subnet. internal partial interface ISubnetReferenceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IProxyResourceReferenceInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IProxyResourceReferenceInternal { } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.json.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.json.cs similarity index 94% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/SubnetReference.json.cs index d76fe9e39cee..b74167a15077 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetReference.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetReference.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class SubnetReference partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new SubnetReference(json) : null; } @@ -70,7 +70,7 @@ internal SubnetReference(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtim { return; } - __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ProxyResourceReference(json); + __proxyResourceReference = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ProxyResourceReference(json); AfterFromJson(json); } diff --git a/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.PowerShell.cs new file mode 100644 index 000000000000..c3d4e9dfb1e7 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.PowerShell.cs @@ -0,0 +1,137 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Defines the virtual network subnets resource settings. + [System.ComponentModel.TypeConverter(typeof(SubnetResourceSettingsTypeConverter))] + public partial class SubnetResourceSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SubnetResourceSettings(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.ResourceMover.Models.Api202101.ISubnetResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SubnetResourceSettings(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.ResourceMover.Models.Api202101.ISubnetResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SubnetResourceSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroup = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference) content.GetValueForProperty("NetworkSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroup, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).AddressPrefix = (string) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).AddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroupSourceArmResourceId = (string) content.GetValueForProperty("NetworkSecurityGroupSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroupSourceArmResourceId, 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 SubnetResourceSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroup = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference) content.GetValueForProperty("NetworkSecurityGroup",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroup, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).AddressPrefix = (string) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).AddressPrefix, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroupSourceArmResourceId = (string) content.GetValueForProperty("NetworkSecurityGroupSourceArmResourceId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal)this).NetworkSecurityGroupSourceArmResourceId, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Defines the virtual network subnets resource settings. + [System.ComponentModel.TypeConverter(typeof(SubnetResourceSettingsTypeConverter))] + public partial interface ISubnetResourceSettings + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.TypeConverter.cs index 58507eece767..1cb78192639c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.cs new file mode 100644 index 000000000000..8c45e72eb7a7 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.cs @@ -0,0 +1,89 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Defines the virtual network subnets resource settings. + public partial class SubnetResourceSettings : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal + { + + /// Backing field for property. + private string _addressPrefix; + + /// Gets or sets address prefix for the subnet. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string AddressPrefix { get => this._addressPrefix; set => this._addressPrefix = value; } + + /// Internal Acessors for NetworkSecurityGroup + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettingsInternal.NetworkSecurityGroup { get => (this._networkSecurityGroup = this._networkSecurityGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference()); set { {_networkSecurityGroup = value;} } } + + /// Backing field for property. + private string _name; + + /// Gets or sets the Subnet name. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference _networkSecurityGroup; + + /// Defines reference to an Azure resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference NetworkSecurityGroup { get => (this._networkSecurityGroup = this._networkSecurityGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference()); set => this._networkSecurityGroup = value; } + + /// Gets the ARM resource ID of the tracked resource being referenced. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string NetworkSecurityGroupSourceArmResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)NetworkSecurityGroup).SourceArmResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReferenceInternal)NetworkSecurityGroup).SourceArmResourceId = value ?? null; } + + /// Creates an new instance. + public SubnetResourceSettings() + { + + } + } + /// Defines the virtual network subnets resource settings. + public partial interface ISubnetResourceSettings : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// Gets or sets address prefix for the subnet. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets address prefix for the subnet.", + SerializedName = @"addressPrefix", + PossibleTypes = new [] { typeof(string) })] + string AddressPrefix { get; set; } + /// Gets or sets the Subnet name. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the Subnet name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Gets the ARM resource ID of the tracked resource being referenced. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the ARM resource ID of the tracked resource being referenced.", + SerializedName = @"sourceArmResourceId", + PossibleTypes = new [] { typeof(string) })] + string NetworkSecurityGroupSourceArmResourceId { get; set; } + + } + /// Defines the virtual network subnets resource settings. + internal partial interface ISubnetResourceSettingsInternal + + { + /// Gets or sets address prefix for the subnet. + string AddressPrefix { get; set; } + /// Gets or sets the Subnet name. + string Name { get; set; } + /// Defines reference to an Azure resource. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IAzureResourceReference NetworkSecurityGroup { get; set; } + /// Gets the ARM resource ID of the tracked resource being referenced. + string NetworkSecurityGroupSourceArmResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.json.cs similarity index 89% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.json.cs index ac908dcbc03c..67e09732e031 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/SubnetResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/SubnetResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class SubnetResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new SubnetResourceSettings(json) : null; } @@ -70,6 +70,7 @@ internal SubnetResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover { return; } + {_networkSecurityGroup = If( json?.PropertyT("networkSecurityGroup"), out var __jsonNetworkSecurityGroup) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.AzureResourceReference.FromJson(__jsonNetworkSecurityGroup) : NetworkSecurityGroup;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_addressPrefix = If( json?.PropertyT("addressPrefix"), out var __jsonAddressPrefix) ? (string)__jsonAddressPrefix : (string)AddressPrefix;} AfterFromJson(json); @@ -94,6 +95,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } + AddIf( null != this._networkSecurityGroup ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._networkSecurityGroup.ToJson(null,serializationMode) : null, "networkSecurityGroup" ,container.Add ); AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); AddIf( null != (((object)this._addressPrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._addressPrefix.ToString()) : null, "addressPrefix" ,container.Add ); AfterToJson(ref container); diff --git a/src/ResourceMover/generated/api/Models/Api202101/Summary.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/Summary.PowerShell.cs new file mode 100644 index 000000000000..2589200a12e3 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/Summary.PowerShell.cs @@ -0,0 +1,133 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Summary item. + [System.ComponentModel.TypeConverter(typeof(SummaryTypeConverter))] + public partial class Summary + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Summary(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.ResourceMover.Models.Api202101.ISummary DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Summary(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.ResourceMover.Models.Api202101.ISummary FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Summary(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Item = (string) content.GetValueForProperty("Item",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Item, 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 Summary(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Item = (string) content.GetValueForProperty("Item",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal)this).Item, 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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Summary item. + [System.ComponentModel.TypeConverter(typeof(SummaryTypeConverter))] + public partial interface ISummary + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/Summary.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/Summary.TypeConverter.cs new file mode 100644 index 000000000000..e87fcd85f44f --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/Summary.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SummaryTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.ISummary ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Summary.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Summary.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Summary.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/Summary.cs b/src/ResourceMover/generated/api/Models/Api202101/Summary.cs new file mode 100644 index 000000000000..412cde27df54 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/Summary.cs @@ -0,0 +1,63 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Summary item. + public partial class Summary : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryInternal + { + + /// Backing field for property. + private int? _count; + + /// Gets the count. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public int? Count { get => this._count; set => this._count = value; } + + /// Backing field for property. + private string _item; + + /// Gets the item. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string Item { get => this._item; set => this._item = value; } + + /// Creates an new instance. + public Summary() + { + + } + } + /// Summary item. + public partial interface ISummary : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// Gets the count. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the count.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + /// Gets the item. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the item.", + SerializedName = @"item", + PossibleTypes = new [] { typeof(string) })] + string Item { get; set; } + + } + /// Summary item. + internal partial interface ISummaryInternal + + { + /// Gets the count. + int? Count { get; set; } + /// Gets the item. + string Item { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/Summary.json.cs b/src/ResourceMover/generated/api/Models/Api202101/Summary.json.cs new file mode 100644 index 000000000000..2674f9090dd1 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/Summary.json.cs @@ -0,0 +1,103 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Summary item. + public partial class Summary + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new Summary(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal Summary(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : Count;} + {_item = If( json?.PropertyT("item"), out var __jsonItem) ? (string)__jsonItem : (string)Item;} + 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.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNumber((int)this._count) : null, "count" ,container.Add ); + AddIf( null != (((object)this._item)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._item.ToString()) : null, "item" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.PowerShell.cs new file mode 100644 index 000000000000..dab416e104c8 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.PowerShell.cs @@ -0,0 +1,133 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Summary Collection. + [System.ComponentModel.TypeConverter(typeof(SummaryCollectionTypeConverter))] + public partial class SummaryCollection + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SummaryCollection(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.ResourceMover.Models.Api202101.ISummaryCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SummaryCollection(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.ResourceMover.Models.Api202101.ISummaryCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SummaryCollection(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).FieldName = (string) content.GetValueForProperty("FieldName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).FieldName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SummaryCollection(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).FieldName = (string) content.GetValueForProperty("FieldName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).FieldName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).Summary = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[]) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)this).Summary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryTypeConverter.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Summary Collection. + [System.ComponentModel.TypeConverter(typeof(SummaryCollectionTypeConverter))] + public partial interface ISummaryCollection + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.TypeConverter.cs new file mode 100644 index 000000000000..ef19d093169e --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SummaryCollectionTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.ISummaryCollection ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SummaryCollection.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SummaryCollection.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SummaryCollection.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.cs b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.cs new file mode 100644 index 000000000000..9c0281797240 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.cs @@ -0,0 +1,63 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Summary Collection. + public partial class SummaryCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal + { + + /// Backing field for property. + private string _fieldName; + + /// Gets or sets the field name on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string FieldName { get => this._fieldName; set => this._fieldName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] _summary; + + /// Gets or sets the list of summary items. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] Summary { get => this._summary; set => this._summary = value; } + + /// Creates an new instance. + public SummaryCollection() + { + + } + } + /// Summary Collection. + public partial interface ISummaryCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// Gets or sets the field name on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the field name on which summary is done.", + SerializedName = @"fieldName", + PossibleTypes = new [] { typeof(string) })] + string FieldName { get; set; } + /// Gets or sets the list of summary items. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the list of summary items.", + SerializedName = @"summary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] Summary { get; set; } + + } + /// Summary Collection. + internal partial interface ISummaryCollectionInternal + + { + /// Gets or sets the field name on which summary is done. + string FieldName { get; set; } + /// Gets or sets the list of summary items. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] Summary { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.json.cs b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.json.cs new file mode 100644 index 000000000000..29a93a48517b --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/SummaryCollection.json.cs @@ -0,0 +1,111 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Summary Collection. + public partial class SummaryCollection + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new SummaryCollection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal SummaryCollection(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_fieldName = If( json?.PropertyT("fieldName"), out var __jsonFieldName) ? (string)__jsonFieldName : (string)FieldName;} + {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? If( __jsonSummary as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Summary.FromJson(__u) )) ))() : null : Summary;} + 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.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._fieldName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._fieldName.ToString()) : null, "fieldName" ,container.Add ); + if (null != this._summary) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); + foreach( var __x in this._summary ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("summary",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.PowerShell.cs similarity index 63% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.PowerShell.cs index ecbf77c2af83..8f62d7073315 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.PowerShell.cs @@ -1,10 +1,10 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; - /// Unresolved dependency collection. - [System.ComponentModel.TypeConverter(typeof(UnresolvedDependencyCollectionTypeConverter))] - public partial class UnresolvedDependencyCollection + /// Unresolved dependencies contract. + [System.ComponentModel.TypeConverter(typeof(UnresolvedDependenciesFilterTypeConverter))] + public partial class UnresolvedDependenciesFilter { /// @@ -48,39 +48,39 @@ public partial class UnresolvedDependencyCollection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new UnresolvedDependencyCollection(content); + return new UnresolvedDependenciesFilter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new UnresolvedDependencyCollection(content); + return new UnresolvedDependenciesFilter(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -88,11 +88,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal UnresolvedDependencyCollection(global::System.Collections.IDictionary content) + internal UnresolvedDependenciesFilter(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -101,17 +101,17 @@ internal UnresolvedDependencyCollection(global::System.Collections.IDictionary c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UnresolvedDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependenciesFilterPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal UnresolvedDependencyCollection(global::System.Management.Automation.PSObject content) + internal UnresolvedDependenciesFilter(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -120,14 +120,14 @@ internal UnresolvedDependencyCollection(global::System.Management.Automation.PSO return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).NextLink, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UnresolvedDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependenciesFilterPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); AfterDeserializePSObject(content); } } - /// Unresolved dependency collection. - [System.ComponentModel.TypeConverter(typeof(UnresolvedDependencyCollectionTypeConverter))] - public partial interface IUnresolvedDependencyCollection + /// Unresolved dependencies contract. + [System.ComponentModel.TypeConverter(typeof(UnresolvedDependenciesFilterTypeConverter))] + public partial interface IUnresolvedDependenciesFilter { diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.TypeConverter.cs new file mode 100644 index 000000000000..1a0d76d4d196 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.TypeConverter.cs @@ -0,0 +1,142 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UnresolvedDependenciesFilterTypeConverter : 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 + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(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.ResourceMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 to the parameter using and + /// + /// 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.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UnresolvedDependenciesFilter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UnresolvedDependenciesFilter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UnresolvedDependenciesFilter.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.cs new file mode 100644 index 000000000000..886b400a90cd --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.cs @@ -0,0 +1,54 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Unresolved dependencies contract. + public partial class UnresolvedDependenciesFilter : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal + { + + /// The count of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public int? Count { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterPropertiesInternal)Property).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterPropertiesInternal)Property).Count = value ?? default(int); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependenciesFilterProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties _property; + + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependenciesFilterProperties()); set => this._property = value; } + + /// Creates an new instance. + public UnresolvedDependenciesFilter() + { + + } + } + /// Unresolved dependencies contract. + public partial interface IUnresolvedDependenciesFilter : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// The count of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The count of the resource.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + + } + /// Unresolved dependencies contract. + internal partial interface IUnresolvedDependenciesFilterInternal + + { + /// The count of the resource. + int? Count { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.json.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.json.cs new file mode 100644 index 000000000000..2dd85d774e9a --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilter.json.cs @@ -0,0 +1,101 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Unresolved dependencies contract. + public partial class UnresolvedDependenciesFilter + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new UnresolvedDependenciesFilter(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.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal UnresolvedDependenciesFilter(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependenciesFilterProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.PowerShell.cs new file mode 100644 index 000000000000..ef3d02e27cd7 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.PowerShell.cs @@ -0,0 +1,132 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(UnresolvedDependenciesFilterPropertiesTypeConverter))] + public partial class UnresolvedDependenciesFilterProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UnresolvedDependenciesFilterProperties(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.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UnresolvedDependenciesFilterProperties(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.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UnresolvedDependenciesFilterProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterPropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterPropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UnresolvedDependenciesFilterProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterPropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterPropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + AfterDeserializePSObject(content); + } + } + [System.ComponentModel.TypeConverter(typeof(UnresolvedDependenciesFilterPropertiesTypeConverter))] + public partial interface IUnresolvedDependenciesFilterProperties + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.TypeConverter.cs similarity index 82% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.TypeConverter.cs index 388e634610bc..619d0b93f3d2 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/MoveResourcePropertiesSourceResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.TypeConverter.cs @@ -1,12 +1,12 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class MoveResourcePropertiesSourceResourceSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class UnresolvedDependenciesFilterPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -25,11 +25,11 @@ public partial class MoveResourcePropertiesSourceResourceSettingsTypeConverter : /// Determines if the converter can convert the parameter to the /// parameter. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, - /// otherwise false + /// true if the instance could be converted to a type, otherwise + /// false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -91,7 +91,7 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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); @@ -99,25 +99,25 @@ public static bool CanConvertFrom(dynamic sourceValue) /// Converts the parameter to the parameter using and /// - /// the value to convert into an instance of the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourcePropertiesSourceResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties).IsAssignableFrom(type)) { return sourceValue; } try { - return MoveResourcePropertiesSourceResourceSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return UnresolvedDependenciesFilterProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -125,11 +125,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return MoveResourcePropertiesSourceResourceSettings.DeserializeFromPSObject(sourceValue); + return UnresolvedDependenciesFilterProperties.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return MoveResourcePropertiesSourceResourceSettings.DeserializeFromDictionary(sourceValue); + return UnresolvedDependenciesFilterProperties.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.cs new file mode 100644 index 000000000000..4011fe833262 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.cs @@ -0,0 +1,43 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + public partial class UnresolvedDependenciesFilterProperties : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterPropertiesInternal + { + + /// Backing field for property. + private int? _count; + + /// The count of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public int? Count { get => this._count; set => this._count = value; } + + /// Creates an new instance. + public UnresolvedDependenciesFilterProperties() + { + + } + } + public partial interface IUnresolvedDependenciesFilterProperties : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// The count of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The count of the resource.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + + } + internal partial interface IUnresolvedDependenciesFilterPropertiesInternal + + { + /// The count of the resource. + int? Count { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.json.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.json.cs new file mode 100644 index 000000000000..3b458999d0fa --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependenciesFilterProperties.json.cs @@ -0,0 +1,101 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + public partial class UnresolvedDependenciesFilterProperties + { + + /// + /// 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.ResourceMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json erialization 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.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependenciesFilterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new UnresolvedDependenciesFilterProperties(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.ResourceMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNumber((int)this._count) : null, "count" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject instance to deserialize from. + internal UnresolvedDependenciesFilterProperties(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : Count;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.PowerShell.cs similarity index 76% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.PowerShell.cs index 42ac059cd079..715dcadaac97 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,27 @@ public partial class UnresolvedDependency partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UnresolvedDependency(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UnresolvedDependency(content); } @@ -80,7 +78,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -88,7 +86,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,13 +99,13 @@ internal UnresolvedDependency(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Id, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -120,8 +118,8 @@ internal UnresolvedDependency(global::System.Management.Automation.PSObject cont return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal)this).Id, global::System.Convert.ToString); AfterDeserializePSObject(content); } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.TypeConverter.cs index b0b0ad0a8040..ef041e4225f9 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.cs index 360d3eed4d07..027ad7288abc 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.cs @@ -1,12 +1,12 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Unresolved dependency. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.DoNotFormat] public partial class UnresolvedDependency : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyInternal { /// Backing field for property. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.json.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.json.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.json.cs index 9ddbdda1ed6a..2c7105efae6d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependency.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependency.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class UnresolvedDependency partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new UnresolvedDependency(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.PowerShell.cs new file mode 100644 index 000000000000..f9bd724440b4 --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.PowerShell.cs @@ -0,0 +1,143 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; + + /// Unresolved dependency collection. + [System.ComponentModel.TypeConverter(typeof(UnresolvedDependencyCollectionTypeConverter))] + public partial class UnresolvedDependencyCollection + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UnresolvedDependencyCollection(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.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UnresolvedDependencyCollection(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.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UnresolvedDependencyCollection(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollection = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection) content.GetValueForProperty("SummaryCollection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollection, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollectionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).TotalCount = (long?) content.GetValueForProperty("TotalCount",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).TotalCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionFieldName = (string) content.GetValueForProperty("SummaryCollectionFieldName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionFieldName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionSummary = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[]) content.GetValueForProperty("SummaryCollectionSummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryTypeConverter.ConvertFrom)); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UnresolvedDependencyCollection(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollection = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection) content.GetValueForProperty("SummaryCollection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollection, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollectionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).TotalCount = (long?) content.GetValueForProperty("TotalCount",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).TotalCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionFieldName = (string) content.GetValueForProperty("SummaryCollectionFieldName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionFieldName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionSummary = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[]) content.GetValueForProperty("SummaryCollectionSummary",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal)this).SummaryCollectionSummary, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryTypeConverter.ConvertFrom)); + AfterDeserializePSObject(content); + } + } + /// Unresolved dependency collection. + [System.ComponentModel.TypeConverter(typeof(UnresolvedDependencyCollectionTypeConverter))] + public partial interface IUnresolvedDependencyCollection + + { + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.TypeConverter.cs index 2f1455fa9d8a..2daa3822fae3 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.cs new file mode 100644 index 000000000000..7ce51a914a9e --- /dev/null +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.cs @@ -0,0 +1,123 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// Unresolved dependency collection. + public partial class UnresolvedDependencyCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal + { + + /// Internal Acessors for SummaryCollection + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal.SummaryCollection { get => (this._summaryCollection = this._summaryCollection ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection()); set { {_summaryCollection = value;} } } + + /// Internal Acessors for TotalCount + long? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollectionInternal.TotalCount { get => this._totalCount; set { {_totalCount = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// Gets or sets the value of next link. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection _summaryCollection; + + /// Gets or sets the list of summary items and the field on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection SummaryCollection { get => (this._summaryCollection = this._summaryCollection ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection()); } + + /// Gets or sets the field name on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public string SummaryCollectionFieldName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).FieldName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).FieldName = value ?? null; } + + /// Gets or sets the list of summary items. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] SummaryCollectionSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).Summary; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollectionInternal)SummaryCollection).Summary = value ?? null /* arrayOf */; } + + /// Backing field for property. + private long? _totalCount; + + /// Gets the total count. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public long? TotalCount { get => this._totalCount; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency[] _value; + + /// Gets or sets the list of unresolved dependencies. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public UnresolvedDependencyCollection() + { + + } + } + /// Unresolved dependency collection. + public partial interface IUnresolvedDependencyCollection : + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable + { + /// Gets or sets the value of next link. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the value of next link.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// Gets or sets the field name on which summary is done. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the field name on which summary is done.", + SerializedName = @"fieldName", + PossibleTypes = new [] { typeof(string) })] + string SummaryCollectionFieldName { get; set; } + /// Gets or sets the list of summary items. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the list of summary items.", + SerializedName = @"summary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] SummaryCollectionSummary { get; set; } + /// Gets the total count. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Gets the total count.", + SerializedName = @"totalCount", + PossibleTypes = new [] { typeof(long) })] + long? TotalCount { get; } + /// Gets or sets the list of unresolved dependencies. + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the list of unresolved dependencies.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency[] Value { get; set; } + + } + /// Unresolved dependency collection. + internal partial interface IUnresolvedDependencyCollectionInternal + + { + /// Gets or sets the value of next link. + string NextLink { get; set; } + /// Gets or sets the list of summary items and the field on which summary is done. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummaryCollection SummaryCollection { get; set; } + /// Gets or sets the field name on which summary is done. + string SummaryCollectionFieldName { get; set; } + /// Gets or sets the list of summary items. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISummary[] SummaryCollectionSummary { get; set; } + /// Gets the total count. + long? TotalCount { get; set; } + /// Gets or sets the list of unresolved dependencies. + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.json.cs b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.json.cs similarity index 78% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.json.cs index d3ad639a8abf..9147939694b4 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UnresolvedDependencyCollection.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UnresolvedDependencyCollection.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class UnresolvedDependencyCollection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependencyCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new UnresolvedDependencyCollection(json) : null; } @@ -77,7 +77,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._summaryCollection ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) this._summaryCollection.ToJson(null,serializationMode) : null, "summaryCollection" ,container.Add ); + } if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -87,6 +90,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("value",__w); } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._totalCount ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNumber((long)this._totalCount) : null, "totalCount" ,container.Add ); + } AfterToJson(ref container); return container; } @@ -103,8 +111,10 @@ internal UnresolvedDependencyCollection(Microsoft.Azure.PowerShell.Cmdlets.Resou { return; } + {_summaryCollection = If( json?.PropertyT("summaryCollection"), out var __jsonSummaryCollection) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SummaryCollection.FromJson(__jsonSummaryCollection) : SummaryCollection;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependency.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependency) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UnresolvedDependency.FromJson(__u) )) ))() : null : Value;} + {_totalCount = If( json?.PropertyT("totalCount"), out var __jsonTotalCount) ? (long?)__jsonTotalCount : TotalCount;} AfterFromJson(json); } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.PowerShell.cs similarity index 59% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.PowerShell.cs index 432a7805ee92..5b935dafb390 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class UpdateMoveCollectionRequest partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UpdateMoveCollectionRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UpdateMoveCollectionRequest(content); } @@ -80,7 +80,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -88,7 +88,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,16 +101,16 @@ internal UpdateMoveCollectionRequest(global::System.Collections.IDictionary cont return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UpdateMoveCollectionRequestTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -123,11 +123,11 @@ internal UpdateMoveCollectionRequest(global::System.Management.Automation.PSObje return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTagsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UpdateMoveCollectionRequestTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType.CreateFrom); AfterDeserializePSObject(content); } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.TypeConverter.cs index f3b1b89d7a92..c580f9e33756 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.cs similarity index 67% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.cs index 3392721cf247..acf1f99ee1df 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.cs @@ -1,41 +1,41 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the request body for updating move collection. public partial class UpdateMoveCollectionRequest : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity _identity; /// Defines the MSI properties of the Move Collection. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity()); set => this._identity = value; } /// Gets or sets the principal id. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).PrincipalId = value; } + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).PrincipalId = value ?? null; } /// Gets or sets the tenant id. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).TenantId = value; } + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).TenantId = value ?? null; } - /// The type of identity used for the region move service. + /// The type of identity used for the resource mover service. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentityInternal)Identity).Type = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType)""); } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity()); set { {_identity = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags _tag; /// Gets or sets the Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UpdateMoveCollectionRequestTags()); set => this._tag = value; } /// Creates an new instance. public UpdateMoveCollectionRequest() @@ -63,11 +63,11 @@ public partial interface IUpdateMoveCollectionRequest : SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] string IdentityTenantId { get; set; } - /// The type of identity used for the region move service. + /// The type of identity used for the resource mover service. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The type of identity used for the region move service.", + Description = @"The type of identity used for the resource mover service.", SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType) })] Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } @@ -77,8 +77,8 @@ public partial interface IUpdateMoveCollectionRequest : ReadOnly = false, Description = @"Gets or sets the Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags Tag { get; set; } } /// Defines the request body for updating move collection. @@ -86,15 +86,15 @@ internal partial interface IUpdateMoveCollectionRequestInternal { /// Defines the MSI properties of the Move Collection. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IIdentity Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IIdentity Identity { get; set; } /// Gets or sets the principal id. string IdentityPrincipalId { get; set; } /// Gets or sets the tenant id. string IdentityTenantId { get; set; } - /// The type of identity used for the region move service. + /// The type of identity used for the resource mover service. Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType? IdentityType { get; set; } /// Gets or sets the Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags Tag { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.json.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.json.cs similarity index 93% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.json.cs index 156d821823be..c7ae487aaa1d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequest.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequest.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class UpdateMoveCollectionRequest partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new UpdateMoveCollectionRequest(json) : null; } @@ -95,8 +95,8 @@ internal UpdateMoveCollectionRequest(Microsoft.Azure.PowerShell.Cmdlets.Resource { return; } - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.Identity.FromJson(__jsonIdentity) : Identity;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTags.FromJson(__jsonTags) : Tag;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.Identity.FromJson(__jsonIdentity) : Identity;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UpdateMoveCollectionRequestTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.PowerShell.cs similarity index 86% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.PowerShell.cs index bf750d19f038..93a61f963a39 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class UpdateMoveCollectionRequestTags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UpdateMoveCollectionRequestTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UpdateMoveCollectionRequestTags(content); } @@ -80,7 +80,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -88,7 +88,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -107,7 +107,7 @@ internal UpdateMoveCollectionRequestTags(global::System.Collections.IDictionary } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.TypeConverter.cs index 35f8bf5435c5..e3597b60eeee 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.cs similarity index 88% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.cs index cf8a993eef22..6ff51518e29a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.cs @@ -1,11 +1,11 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Gets or sets the Resource tags. public partial class UpdateMoveCollectionRequestTags : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTagsInternal { /// Creates an new instance. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.dictionary.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.dictionary.cs similarity index 96% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.dictionary.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.dictionary.cs index f23278ebdc00..8c9719e18591 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.dictionary.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.dictionary.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -65,6 +65,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UpdateMoveCollectionRequestTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UpdateMoveCollectionRequestTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.json.cs b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.json.cs index 44275ef65d22..dde9abed2643 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/UpdateMoveCollectionRequestTags.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/UpdateMoveCollectionRequestTags.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class UpdateMoveCollectionRequestTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequestTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequestTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new UpdateMoveCollectionRequestTags(json) : null; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.PowerShell.cs similarity index 62% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.PowerShell.cs index fa73489f1702..bb864cb5fabd 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class VirtualMachineResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new VirtualMachineResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new VirtualMachineResourceSettings(content); } @@ -80,7 +80,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -88,7 +88,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,16 +101,16 @@ internal VirtualMachineResourceSettings(global::System.Collections.IDictionary c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId = (string) content.GetValueForProperty("TargetAvailabilitySetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone?) content.GetValueForProperty("TargetAvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetVMSize = (string) content.GetValueForProperty("TargetVMSize",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetVMSize, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone?) content.GetValueForProperty("TargetAvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetVMSize = (string) content.GetValueForProperty("TargetVMSize",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetVMSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId = (string) content.GetValueForProperty("TargetAvailabilitySetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -123,11 +123,11 @@ internal VirtualMachineResourceSettings(global::System.Management.Automation.PSO return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId = (string) content.GetValueForProperty("TargetAvailabilitySetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone?) content.GetValueForProperty("TargetAvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetVMSize = (string) content.GetValueForProperty("TargetVMSize",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal)this).TargetVMSize, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone?) content.GetValueForProperty("TargetAvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilityZone, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZone.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetVMSize = (string) content.GetValueForProperty("TargetVMSize",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetVMSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId = (string) content.GetValueForProperty("TargetAvailabilitySetId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal)this).TargetAvailabilitySetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.TypeConverter.cs index 6994e68934e5..3b345223ca84 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.cs similarity index 86% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.cs index 024aadafcc73..109fa36f2a3a 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.cs @@ -1,24 +1,24 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Gets or sets the virtual machine resource settings. public partial class VirtualMachineResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Backing field for property. private string _targetAvailabilitySetId; @@ -38,7 +38,7 @@ public partial class VirtualMachineResourceSettings : /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Backing field for property. private string _targetVMSize; @@ -68,7 +68,7 @@ public VirtualMachineResourceSettings() /// Gets or sets the virtual machine resource settings. public partial interface IVirtualMachineResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// /// Gets or sets the target availability set id for virtual machines not in an availability set at source. @@ -100,7 +100,7 @@ public partial interface IVirtualMachineResourceSettings : } /// Gets or sets the virtual machine resource settings. internal partial interface IVirtualMachineResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// /// Gets or sets the target availability set id for virtual machines not in an availability set at source. diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.json.cs similarity index 95% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.json.cs index e65555e7f983..58c95658cf3b 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualMachineResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualMachineResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class VirtualMachineResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualMachineResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualMachineResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new VirtualMachineResourceSettings(json) : null; } @@ -78,9 +78,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } __resourceSettings?.ToJson(container, serializationMode); - AddIf( null != (((object)this._targetAvailabilitySetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetAvailabilitySetId.ToString()) : null, "targetAvailabilitySetId" ,container.Add ); AddIf( null != (((object)this._targetAvailabilityZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetAvailabilityZone.ToString()) : null, "targetAvailabilityZone" ,container.Add ); AddIf( null != (((object)this._targetVMSize)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetVMSize.ToString()) : null, "targetVmSize" ,container.Add ); + AddIf( null != (((object)this._targetAvailabilitySetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._targetAvailabilitySetId.ToString()) : null, "targetAvailabilitySetId" ,container.Add ); AfterToJson(ref container); return container; } @@ -97,10 +97,10 @@ internal VirtualMachineResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Resou { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); - {_targetAvailabilitySetId = If( json?.PropertyT("targetAvailabilitySetId"), out var __jsonTargetAvailabilitySetId) ? (string)__jsonTargetAvailabilitySetId : (string)TargetAvailabilitySetId;} + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); {_targetAvailabilityZone = If( json?.PropertyT("targetAvailabilityZone"), out var __jsonTargetAvailabilityZone) ? (string)__jsonTargetAvailabilityZone : (string)TargetAvailabilityZone;} {_targetVMSize = If( json?.PropertyT("targetVmSize"), out var __jsonTargetVMSize) ? (string)__jsonTargetVMSize : (string)TargetVMSize;} + {_targetAvailabilitySetId = If( json?.PropertyT("targetAvailabilitySetId"), out var __jsonTargetAvailabilitySetId) ? (string)__jsonTargetAvailabilitySetId : (string)TargetAvailabilitySetId;} AfterFromJson(json); } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.PowerShell.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.PowerShell.cs similarity index 57% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.PowerShell.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.PowerShell.cs index 1fd64793a972..c02909e0427c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.PowerShell.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -48,29 +48,29 @@ public partial class VirtualNetworkResourceSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new VirtualNetworkResourceSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new VirtualNetworkResourceSettings(content); } @@ -80,7 +80,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -88,7 +88,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api2019100 public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -101,17 +101,17 @@ internal VirtualNetworkResourceSettings(global::System.Collections.IDictionary c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).AddressSpace = (string[]) content.GetValueForProperty("AddressSpace",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).AddressSpace, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).DnsServer = (string[]) content.GetValueForProperty("DnsServer",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).DnsServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection = (bool?) content.GetValueForProperty("EnableDdosProtection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings[]) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).Subnet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection = (bool?) content.GetValueForProperty("EnableDdosProtection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).AddressSpace = (string[]) content.GetValueForProperty("AddressSpace",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).AddressSpace, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).DnsServer = (string[]) content.GetValueForProperty("DnsServer",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).DnsServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings[]) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).Subnet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -124,12 +124,12 @@ internal VirtualNetworkResourceSettings(global::System.Management.Automation.PSO return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).AddressSpace = (string[]) content.GetValueForProperty("AddressSpace",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).AddressSpace, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).DnsServer = (string[]) content.GetValueForProperty("DnsServer",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).DnsServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection = (bool?) content.GetValueForProperty("EnableDdosProtection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings[]) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal)this).Subnet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetResourceSettingsTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection = (bool?) content.GetValueForProperty("EnableDdosProtection",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).EnableDdosProtection, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).AddressSpace = (string[]) content.GetValueForProperty("AddressSpace",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).AddressSpace, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).DnsServer = (string[]) content.GetValueForProperty("DnsServer",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).DnsServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings[]) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal)this).Subnet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetResourceSettingsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName = (string) content.GetValueForProperty("TargetResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)this).TargetResourceName, global::System.Convert.ToString); AfterDeserializePSObject(content); } } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.TypeConverter.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.TypeConverter.cs similarity index 97% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.TypeConverter.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.TypeConverter.cs index b505a6a7cdca..eecdcf21c1dc 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.TypeConverter.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell; @@ -101,14 +101,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.cs similarity index 84% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.cs index c29b60c99c7a..2a64c598580c 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.cs @@ -1,18 +1,18 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; /// Defines the virtual network resource settings. public partial class VirtualNetworkResourceSettings : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettingsInternal, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettingsInternal, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(); /// Backing field for property. private string[] _addressSpace; @@ -45,18 +45,18 @@ public partial class VirtualNetworkResourceSettings : /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. /// [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).ResourceType = value; } + public string ResourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).ResourceType = value ; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings[] _subnet; + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings[] _subnet; /// Gets or sets List of subnets in a VirtualNetwork. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings[] Subnet { get => this._subnet; set => this._subnet = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings[] Subnet { get => this._subnet; set => this._subnet = value; } /// Gets or sets the target Resource name. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.PropertyOrigin.Inherited)] - public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value; } + public string TargetResourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal)__resourceSettings).TargetResourceName = value ; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation @@ -79,7 +79,7 @@ public VirtualNetworkResourceSettings() /// Defines the virtual network resource settings. public partial interface IVirtualNetworkResourceSettings : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettings + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings { /// Gets or sets the address prefixes for the virtual network. [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( @@ -119,13 +119,13 @@ public partial interface IVirtualNetworkResourceSettings : ReadOnly = false, Description = @"Gets or sets List of subnets in a VirtualNetwork.", SerializedName = @"subnets", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings[] Subnet { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings[] Subnet { get; set; } } /// Defines the virtual network resource settings. internal partial interface IVirtualNetworkResourceSettingsInternal : - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettingsInternal { /// Gets or sets the address prefixes for the virtual network. string[] AddressSpace { get; set; } @@ -140,7 +140,7 @@ internal partial interface IVirtualNetworkResourceSettingsInternal : /// bool? EnableDdosProtection { get; set; } /// Gets or sets List of subnets in a VirtualNetwork. - Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings[] Subnet { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings[] Subnet { get; set; } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.json.cs b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.json.cs similarity index 92% rename from src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.json.cs rename to src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.json.cs index 59560d2fb118..ce6f0bd9a98d 100644 --- a/src/ResourceMover/generated/api/Models/Api20191001Preview/VirtualNetworkResourceSettings.json.cs +++ b/src/ResourceMover/generated/api/Models/Api202101/VirtualNetworkResourceSettings.json.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101 { using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; @@ -47,13 +47,13 @@ public partial class VirtualNetworkResourceSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IVirtualNetworkResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IVirtualNetworkResourceSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject json ? new VirtualNetworkResourceSettings(json) : null; } @@ -78,6 +78,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To return container; } __resourceSettings?.ToJson(container, serializationMode); + AddIf( null != this._enableDdosProtection ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._enableDdosProtection) : null, "enableDdosProtection" ,container.Add ); if (null != this._addressSpace) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -96,7 +97,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To } container.Add("dnsServers",__r); } - AddIf( null != this._enableDdosProtection ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonBoolean((bool)this._enableDdosProtection) : null, "enableDdosProtection" ,container.Add ); if (null != this._subnet) { var __m = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.XNodeArray(); @@ -122,11 +122,11 @@ internal VirtualNetworkResourceSettings(Microsoft.Azure.PowerShell.Cmdlets.Resou { return; } - __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceSettings(json); + __resourceSettings = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings(json); + {_enableDdosProtection = If( json?.PropertyT("enableDdosProtection"), out var __jsonEnableDdosProtection) ? (bool?)__jsonEnableDdosProtection : EnableDdosProtection;} {_addressSpace = If( json?.PropertyT("addressSpace"), out var __jsonAddressSpace) ? If( __jsonAddressSpace as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AddressSpace;} {_dnsServer = If( json?.PropertyT("dnsServers"), out var __jsonDnsServers) ? If( __jsonDnsServers as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : DnsServer;} - {_enableDdosProtection = If( json?.PropertyT("enableDdosProtection"), out var __jsonEnableDdosProtection) ? (bool?)__jsonEnableDdosProtection : EnableDdosProtection;} - {_subnet = If( json?.PropertyT("subnets"), out var __jsonSubnets) ? If( __jsonSubnets as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ISubnetResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.SubnetResourceSettings.FromJson(__k) )) ))() : null : Subnet;} + {_subnet = If( json?.PropertyT("subnets"), out var __jsonSubnets) ? If( __jsonSubnets as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ISubnetResourceSettings) (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.SubnetResourceSettings.FromJson(__k) )) ))() : null : Subnet;} AfterFromJson(json); } } diff --git a/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.PowerShell.cs b/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.PowerShell.cs index a584081975fe..94c8ddd3cc9e 100644 --- a/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.PowerShell.cs +++ b/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.PowerShell.cs @@ -98,11 +98,11 @@ internal ResourceMoverIdentity(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveCollectionName = (string) content.GetValueForProperty("MoveCollectionName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveCollectionName, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveResourceName = (string) content.GetValueForProperty("MoveResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id, global::System.Convert.ToString); AfterDeserializeDictionary(content); } @@ -120,11 +120,11 @@ internal ResourceMoverIdentity(global::System.Management.Automation.PSObject con return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveCollectionName = (string) content.GetValueForProperty("MoveCollectionName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveCollectionName, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveResourceName = (string) content.GetValueForProperty("MoveResourceName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).MoveResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.IResourceMoverIdentityInternal)this).Id, global::System.Convert.ToString); AfterDeserializePSObject(content); } diff --git a/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.json.cs b/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.json.cs index 535539539ac3..ba6cc3ad4485 100644 --- a/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.json.cs +++ b/src/ResourceMover/generated/api/Models/ResourceMoverIdentity.json.cs @@ -74,11 +74,11 @@ internal ResourceMoverIdentity(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover. { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} {_moveCollectionName = If( json?.PropertyT("moveCollectionName"), out var __jsonMoveCollectionName) ? (string)__jsonMoveCollectionName : (string)MoveCollectionName;} {_moveResourceName = If( json?.PropertyT("moveResourceName"), out var __jsonMoveResourceName) ? (string)__jsonMoveResourceName : (string)MoveResourceName;} - {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} AfterFromJson(json); } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode To { return container; } - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); AddIf( null != (((object)this._moveCollectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveCollectionName.ToString()) : null, "moveCollectionName" ,container.Add ); AddIf( null != (((object)this._moveResourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._moveResourceName.ToString()) : null, "moveResourceName" ,container.Add ); - AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); - AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ResourceMover/generated/api/ResourceMover.cs b/src/ResourceMover/generated/api/ResourceMover.cs index eb36faa3939f..03ae1d871694 100644 --- a/src/ResourceMover/generated/api/ResourceMover.cs +++ b/src/ResourceMover/generated/api/ResourceMover.cs @@ -9,10 +9,295 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover /// /// Low-level API implementation for the ResourceMover service. + /// A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones + /// within a region. /// public partial class ResourceMover { + /// + /// Removes the set of move resources included in the request body from move collection. The orchestration is done by service. + /// To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. + /// + /// The Subscription ID. + /// + /// + /// Defines the request body for bulk remove of move resources operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 MoveCollectionsBulkRemove(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-01-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.Migrate/moveCollections/" + + global::System.Uri.EscapeDataString(moveCollectionName) + + "/bulkRemove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MoveCollectionsBulkRemove_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Removes the set of move resources included in the request body from move collection. The orchestration is done by service. + /// To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. + /// + /// + /// Defines the request body for bulk remove of move resources operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 MoveCollectionsBulkRemoveViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-01-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.Migrate/moveCollections/(?[^/]+)/bulkRemove$").Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/bulkRemove'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var moveCollectionName = _match.Groups["moveCollectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Migrate/moveCollections/" + + moveCollectionName + + "/bulkRemove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MoveCollectionsBulkRemove_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.ResourceMover.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 MoveCollectionsBulkRemove_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.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.ResourceMover.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 Subscription ID. + /// + /// + /// Defines the request body for bulk remove of move resources operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MoveCollectionsBulkRemove_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(moveCollectionName),moveCollectionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + /// /// Commits the set of resources included in the request body. The commit operation is triggered on the moveResources in the /// moveState 'CommitPending' or 'CommitFailed', on a successful completion the moveResource moveState do a transition to @@ -31,15 +316,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsCommit(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsCommit(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -48,19 +333,20 @@ public partial class ResourceMover + "/commit" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsCommit_Call(request,onOk,onDefault,eventListener,sender); } @@ -82,9 +368,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsCommitViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsCommitViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -101,8 +387,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -111,19 +397,20 @@ public partial class ResourceMover + "/commit" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsCommit_Call(request,onOk,onDefault,eventListener,sender); } @@ -139,15 +426,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsCommit_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsCommit_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; @@ -155,7 +443,7 @@ public partial class ResourceMover var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -181,33 +469,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -222,6 +512,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -247,13 +540,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -280,7 +573,7 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsCommit_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MoveCollectionsCommit_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -306,15 +599,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsCreate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection 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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsCreate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection 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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -322,19 +615,20 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveCollectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); } @@ -352,9 +646,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection 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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection 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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -371,8 +665,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -380,19 +674,20 @@ public partial class ResourceMover + moveCollectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); } @@ -409,15 +704,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, 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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, 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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -426,19 +722,19 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -465,7 +761,7 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsCreate_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MoveCollectionsCreate_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -490,15 +786,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsDelete(string subscriptionId, string resourceGroupName, string moveCollectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsDelete(string subscriptionId, string resourceGroupName, string moveCollectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -506,15 +802,16 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveCollectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } @@ -531,9 +828,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -550,8 +847,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -559,15 +856,16 @@ public partial class ResourceMover + moveCollectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } @@ -584,15 +882,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; @@ -600,7 +899,7 @@ public partial class ResourceMover var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -626,33 +925,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -667,6 +968,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -692,7 +996,7 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.NoContent: @@ -704,7 +1008,7 @@ public partial class ResourceMover default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -758,15 +1062,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsDiscard(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsDiscard(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -775,19 +1079,20 @@ public partial class ResourceMover + "/discard" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsDiscard_Call(request,onOk,onDefault,eventListener,sender); } @@ -809,9 +1114,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsDiscardViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsDiscardViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -828,8 +1133,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -838,19 +1143,20 @@ public partial class ResourceMover + "/discard" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsDiscard_Call(request,onOk,onDefault,eventListener,sender); } @@ -866,15 +1172,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsDiscard_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsDiscard_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; @@ -882,7 +1189,7 @@ public partial class ResourceMover var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -908,33 +1215,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -949,6 +1258,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -974,13 +1286,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1007,7 +1319,7 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsDiscard_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MoveCollectionsDiscard_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1031,15 +1343,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsGet(string subscriptionId, string resourceGroupName, string moveCollectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsGet(string subscriptionId, string resourceGroupName, string moveCollectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -1047,15 +1359,16 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveCollectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -1071,9 +1384,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsGetViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsGetViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1090,8 +1403,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -1099,15 +1412,16 @@ public partial class ResourceMover + moveCollectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -1123,15 +1437,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -1140,13 +1455,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1200,15 +1515,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsInitiateMove(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsInitiateMove(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -1217,19 +1532,20 @@ public partial class ResourceMover + "/initiateMove" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsInitiateMove_Call(request,onOk,onDefault,eventListener,sender); } @@ -1251,9 +1567,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsInitiateMoveViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsInitiateMoveViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1270,8 +1586,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -1280,19 +1596,20 @@ public partial class ResourceMover + "/initiateMove" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsInitiateMove_Call(request,onOk,onDefault,eventListener,sender); } @@ -1308,15 +1625,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsInitiateMove_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsInitiateMove_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; @@ -1324,7 +1642,7 @@ public partial class ResourceMover var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -1350,33 +1668,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -1391,6 +1711,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -1416,13 +1739,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1449,7 +1772,7 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsInitiateMove_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MoveCollectionsInitiateMove_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1472,30 +1795,31 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsByResourceGroup(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsByResourceGroup(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Migrate/moveCollections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsListMoveCollectionsByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); } @@ -1511,9 +1835,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsByResourceGroupViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsByResourceGroupViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1529,23 +1853,24 @@ public partial class ResourceMover var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName + "/providers/Microsoft.Migrate/moveCollections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsListMoveCollectionsByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); } @@ -1563,15 +1888,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsByResourceGroup_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsByResourceGroup_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -1580,13 +1906,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionResultList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionResultList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1630,28 +1956,29 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/providers/Microsoft.Migrate/moveCollections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsListMoveCollectionsBySubscription_Call(request,onOk,onDefault,eventListener,sender); } @@ -1667,9 +1994,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsBySubscriptionViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsBySubscriptionViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1684,21 +2011,22 @@ public partial class ResourceMover // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/providers/Microsoft.Migrate/moveCollections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsListMoveCollectionsBySubscription_Call(request,onOk,onDefault,eventListener,sender); } @@ -1716,15 +2044,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsBySubscription_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsListMoveCollectionsBySubscription_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -1733,13 +2062,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollectionResultList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollectionResultList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1771,6 +2100,182 @@ public partial class ResourceMover } } + /// List of the move resources for which an arm resource is required for. + /// The Subscription ID. + /// The Resource Group Name. + /// The Move Collection Name. + /// The sourceId for which the api is invoked. + /// a delegate that is 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.ResourceMover.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 MoveCollectionsListRequiredFor(string subscriptionId, string resourceGroupName, string moveCollectionName, string sourceId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-01-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.Migrate/moveCollections/" + + global::System.Uri.EscapeDataString(moveCollectionName) + + "/requiredFor" + + "?" + + "sourceId=" + global::System.Uri.EscapeDataString(sourceId) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MoveCollectionsListRequiredFor_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List of the move resources for which an arm resource is required for. + /// + /// The sourceId for which the api is invoked. + /// a delegate that is 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.ResourceMover.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 MoveCollectionsListRequiredForViaIdentity(global::System.String viaIdentity, string sourceId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-01-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.Migrate/moveCollections/(?[^/]+)/requiredFor$").Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/requiredFor'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var moveCollectionName = _match.Groups["moveCollectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Migrate/moveCollections/" + + moveCollectionName + + "/requiredFor" + + "?" + + "sourceId=" + global::System.Uri.EscapeDataString(sourceId) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MoveCollectionsListRequiredFor_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.ResourceMover.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 MoveCollectionsListRequiredFor_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.RequiredForResourcesCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 Subscription ID. + /// The Resource Group Name. + /// The Move Collection Name. + /// The sourceId for which the api is invoked. + /// 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 MoveCollectionsListRequiredFor_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, string sourceId, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(moveCollectionName),moveCollectionName); + await eventListener.AssertNotNull(nameof(sourceId),sourceId); + } + } + /// /// Initiates prepare for the set of resources included in the request body. The prepare operation is on the moveResources /// that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the moveResource moveState do @@ -1789,15 +2294,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsPrepare(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsPrepare(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -1806,19 +2311,20 @@ public partial class ResourceMover + "/prepare" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsPrepare_Call(request,onOk,onDefault,eventListener,sender); } @@ -1840,9 +2346,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsPrepareViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsPrepareViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1859,8 +2365,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -1869,19 +2375,20 @@ public partial class ResourceMover + "/prepare" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsPrepare_Call(request,onOk,onDefault,eventListener,sender); } @@ -1897,15 +2404,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsPrepare_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsPrepare_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; @@ -1913,7 +2421,7 @@ public partial class ResourceMover var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -1939,33 +2447,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -1980,6 +2490,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -2005,13 +2518,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2038,7 +2551,7 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsPrepare_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MoveCollectionsPrepare_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2064,15 +2577,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsResolveDependencies(string subscriptionId, string resourceGroupName, string moveCollectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsResolveDependencies(string subscriptionId, string resourceGroupName, string moveCollectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -2081,15 +2594,16 @@ public partial class ResourceMover + "/resolveDependencies" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsResolveDependencies_Call(request,onOk,onDefault,eventListener,sender); } @@ -2107,9 +2621,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsResolveDependenciesViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsResolveDependenciesViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2126,8 +2640,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -2136,15 +2650,16 @@ public partial class ResourceMover + "/resolveDependencies" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsResolveDependencies_Call(request,onOk,onDefault,eventListener,sender); } @@ -2160,15 +2675,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsResolveDependencies_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsResolveDependencies_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; @@ -2176,7 +2692,7 @@ public partial class ResourceMover var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -2202,33 +2718,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -2243,6 +2761,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -2268,13 +2789,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2323,15 +2844,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsUpdate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsUpdate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -2339,19 +2860,20 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveCollectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsUpdate_Call(request,onOk,onDefault,eventListener,sender); } @@ -2368,9 +2890,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveCollectionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveCollectionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2387,8 +2909,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -2396,19 +2918,20 @@ public partial class ResourceMover + moveCollectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveCollectionsUpdate_Call(request,onOk,onDefault,eventListener,sender); } @@ -2424,15 +2947,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsUpdate_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveCollectionsUpdate_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -2441,13 +2965,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2474,7 +2998,7 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveCollectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUpdateMoveCollectionRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MoveCollectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUpdateMoveCollectionRequest body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2500,15 +3024,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesCreate(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesCreate(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -2518,19 +3042,20 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveResourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesCreate_Call(request,onOk,onDefault,eventListener,sender); } @@ -2547,9 +3072,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2567,8 +3092,8 @@ public partial class ResourceMover var moveCollectionName = _match.Groups["moveCollectionName"].Value; var moveResourceName = _match.Groups["moveResourceName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -2578,19 +3103,20 @@ public partial class ResourceMover + moveResourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesCreate_Call(request,onOk,onDefault,eventListener,sender); } @@ -2606,22 +3132,23 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveResourcesCreate_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveResourcesCreate_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -2647,33 +3174,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -2688,6 +3217,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -2713,13 +3245,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2747,7 +3279,7 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveResourcesCreate_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task MoveResourcesCreate_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource body, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2774,15 +3306,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesDelete(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesDelete(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -2792,15 +3324,16 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveResourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } @@ -2817,9 +3350,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2837,8 +3370,8 @@ public partial class ResourceMover var moveCollectionName = _match.Groups["moveCollectionName"].Value; var moveResourceName = _match.Groups["moveResourceName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -2848,15 +3381,16 @@ public partial class ResourceMover + moveResourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } @@ -2873,15 +3407,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveResourcesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveResourcesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; @@ -2889,7 +3424,7 @@ public partial class ResourceMover var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); - while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // get the delay before polling. (default to 30 seconds if not present) @@ -2915,33 +3450,35 @@ public partial class ResourceMover // check for cancellation if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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; + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } switch( state?.ToString()?.ToLower() ) { - case "succeeded": case "failed": + //error = true; + break; + case "succeeded": case "canceled": // we're done polling. break; @@ -2956,6 +3493,9 @@ public partial class ResourceMover // 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.ResourceMover.Runtime.UndeclaredResponseException(_response); + } } // check for terminal status code @@ -2981,7 +3521,7 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.NoContent: @@ -2993,7 +3533,7 @@ public partial class ResourceMover default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3044,15 +3584,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesGet(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesGet(string subscriptionId, string resourceGroupName, string moveCollectionName, string moveResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -3062,15 +3602,16 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveResourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -3086,9 +3627,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesGetViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesGetViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3106,8 +3647,8 @@ public partial class ResourceMover var moveCollectionName = _match.Groups["moveCollectionName"].Value; var moveResourceName = _match.Groups["moveResourceName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -3117,15 +3658,16 @@ public partial class ResourceMover + moveResourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -3141,15 +3683,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveResourcesGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveResourcesGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -3158,13 +3701,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3216,15 +3759,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesList(string subscriptionId, string resourceGroupName, string moveCollectionName, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesList(string subscriptionId, string resourceGroupName, string moveCollectionName, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -3235,15 +3778,16 @@ public partial class ResourceMover + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesList_Call(request,onOk,onDefault,eventListener,sender); } @@ -3261,9 +3805,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task MoveResourcesListViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task MoveResourcesListViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3280,8 +3824,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -3292,15 +3836,16 @@ public partial class ResourceMover + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.MoveResourcesList_Call(request,onOk,onDefault,eventListener,sender); } @@ -3316,15 +3861,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task MoveResourcesList_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task MoveResourcesList_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -3333,13 +3879,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResourceCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResourceCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3386,26 +3932,27 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsDiscoveryGet(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsDiscoveryGet(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/providers/Microsoft.Migrate/operations" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Migrate/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.OperationsDiscoveryGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -3420,9 +3967,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsDiscoveryGetViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsDiscoveryGetViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3436,19 +3983,20 @@ public partial class ResourceMover // replace URI parameters with values from identity // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/providers/Microsoft.Migrate/operations" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Migrate/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.OperationsDiscoveryGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -3464,15 +4012,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsDiscoveryGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsDiscoveryGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -3481,13 +4030,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationsDiscoveryCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.OperationsDiscoveryCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3522,6 +4071,9 @@ public partial class ResourceMover /// The Subscription ID. /// The Resource Group Name. /// The Move Collection Name. + /// Defines the dependency level. + /// OData order by query option. For example, you can use $orderby=Count desc. + /// The filter to apply on the operation. For example, $apply=filter(count eq 2). /// a delegate that is 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). @@ -3530,15 +4082,15 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UnresolvedDependenciesGet(string subscriptionId, string resourceGroupName, string moveCollectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UnresolvedDependenciesGet(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel? dependencyLevel, string Orderby, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) @@ -3546,16 +4098,23 @@ public partial class ResourceMover + global::System.Uri.EscapeDataString(moveCollectionName) + "/unresolvedDependencies" + "?" + + (string.IsNullOrEmpty(dependencyLevel) ? global::System.String.Empty : "dependencyLevel=" + global::System.Uri.EscapeDataString(dependencyLevel)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.UnresolvedDependenciesGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -3563,6 +4122,9 @@ public partial class ResourceMover /// Gets a list of unresolved dependencies. /// + /// Defines the dependency level. + /// OData order by query option. For example, you can use $orderby=Count desc. + /// The filter to apply on the operation. For example, $apply=filter(count eq 2). /// a delegate that is 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). @@ -3571,9 +4133,9 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UnresolvedDependenciesGetViaIdentity(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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UnresolvedDependenciesGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel? dependencyLevel, string Orderby, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) { - var apiVersion = @"2019-10-01-preview"; + var apiVersion = @"2021-01-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3590,8 +4152,8 @@ public partial class ResourceMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var moveCollectionName = _match.Groups["moveCollectionName"].Value; // construct URL - var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace( - "https://management.azure.com/subscriptions/" + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName @@ -3599,16 +4161,23 @@ public partial class ResourceMover + moveCollectionName + "/unresolvedDependencies" + "?" + + (string.IsNullOrEmpty(dependencyLevel) ? global::System.String.Empty : "dependencyLevel=" + global::System.Uri.EscapeDataString(dependencyLevel)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2")); + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call await this.UnresolvedDependenciesGet_Call(request,onOk,onDefault,eventListener,sender); } @@ -3624,15 +4193,16 @@ public partial class ResourceMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UnresolvedDependenciesGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UnresolvedDependenciesGet_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.ResourceMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sender.SendAsync(request, eventListener); + _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -3641,13 +4211,13 @@ public partial class ResourceMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.UnresolvedDependencyCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.UnresolvedDependencyCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3669,17 +4239,24 @@ public partial class ResourceMover /// The Subscription ID. /// The Resource Group Name. /// The Move Collection Name. + /// Defines the dependency level. + /// OData order by query option. For example, you can use $orderby=Count desc. + /// The filter to apply on the operation. For example, $apply=filter(count eq 2). /// 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 UnresolvedDependenciesGet_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UnresolvedDependenciesGet_Validate(string subscriptionId, string resourceGroupName, string moveCollectionName, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel? dependencyLevel, string Orderby, string Filter, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(moveCollectionName),moveCollectionName); + await eventListener.AssertNotNull(nameof(dependencyLevel),dependencyLevel); + await eventListener.AssertEnum(nameof(dependencyLevel),dependencyLevel,@"Direct", @"Descendant"); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + await eventListener.AssertNotNull(nameof(Filter),Filter); } } } diff --git a/src/ResourceMover/generated/api/Support/DependencyLevel.Completer.cs b/src/ResourceMover/generated/api/Support/DependencyLevel.Completer.cs new file mode 100644 index 000000000000..823fd3894920 --- /dev/null +++ b/src/ResourceMover/generated/api/Support/DependencyLevel.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support +{ + + /// Argument completer implementation for DependencyLevel. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevelTypeConverter))] + public partial struct DependencyLevel : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Direct".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("Direct", "Direct", global::System.Management.Automation.CompletionResultType.ParameterValue, "Direct"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Descendant".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("Descendant", "Descendant", global::System.Management.Automation.CompletionResultType.ParameterValue, "Descendant"); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Support/DependencyLevel.TypeConverter.cs b/src/ResourceMover/generated/api/Support/DependencyLevel.TypeConverter.cs new file mode 100644 index 000000000000..94617022da3c --- /dev/null +++ b/src/ResourceMover/generated/api/Support/DependencyLevel.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support +{ + + /// TypeConverter implementation for DependencyLevel. + public partial class DependencyLevelTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DependencyLevel.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Support/DependencyLevel.cs b/src/ResourceMover/generated/api/Support/DependencyLevel.cs new file mode 100644 index 000000000000..fdcbd047c515 --- /dev/null +++ b/src/ResourceMover/generated/api/Support/DependencyLevel.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support +{ + + public partial struct DependencyLevel : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel Descendant = @"Descendant"; + + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel Direct = @"Direct"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DependencyLevel + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DependencyLevel(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the + /// the value to create an instance for. + private DependencyLevel(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DependencyLevel + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DependencyLevel (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DependencyLevel && Equals((DependencyLevel)obj); + } + + /// Returns hashCode for enum DependencyLevel + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DependencyLevel + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DependencyLevel + /// the value to convert to an instance of . + + public static implicit operator DependencyLevel(string value) + { + return new DependencyLevel(value); + } + + /// Implicit operator to convert DependencyLevel to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel e) + { + return e._value; + } + + /// Overriding != operator for enum DependencyLevel + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DependencyLevel + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel e1, Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Support/DependencyType.Completer.cs b/src/ResourceMover/generated/api/Support/DependencyType.Completer.cs index c4fe387e423d..3ad259941650 100644 --- a/src/ResourceMover/generated/api/Support/DependencyType.Completer.cs +++ b/src/ResourceMover/generated/api/Support/DependencyType.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for DependencyType. + /// Defines the dependency type. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyTypeTypeConverter))] public partial struct DependencyType : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/DependencyType.TypeConverter.cs b/src/ResourceMover/generated/api/Support/DependencyType.TypeConverter.cs index 44cb505aba0a..fc317a2e7d8a 100644 --- a/src/ResourceMover/generated/api/Support/DependencyType.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/DependencyType.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for DependencyType. + /// Defines the dependency type. public partial class DependencyTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/DependencyType.cs b/src/ResourceMover/generated/api/Support/DependencyType.cs index 814fba06c6ea..3264f240cea6 100644 --- a/src/ResourceMover/generated/api/Support/DependencyType.cs +++ b/src/ResourceMover/generated/api/Support/DependencyType.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Defines the dependency type. public partial struct DependencyType : System.IEquatable { @@ -20,7 +21,7 @@ public partial struct DependencyType : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new DependencyType(System.Convert.ToString(value)); + return new DependencyType(global::System.Convert.ToString(value)); } /// Creates an instance of the diff --git a/src/ResourceMover/generated/api/Support/JobName.Completer.cs b/src/ResourceMover/generated/api/Support/JobName.Completer.cs index 4880bcaf7f61..dbd13a493e51 100644 --- a/src/ResourceMover/generated/api/Support/JobName.Completer.cs +++ b/src/ResourceMover/generated/api/Support/JobName.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for JobName. + /// Defines the job name. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.JobNameTypeConverter))] public partial struct JobName : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/JobName.TypeConverter.cs b/src/ResourceMover/generated/api/Support/JobName.TypeConverter.cs index 3d821951a700..fba6f76a1178 100644 --- a/src/ResourceMover/generated/api/Support/JobName.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/JobName.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for JobName. + /// Defines the job name. public partial class JobNameTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/JobName.cs b/src/ResourceMover/generated/api/Support/JobName.cs index 026b9056d232..eb78554ab33b 100644 --- a/src/ResourceMover/generated/api/Support/JobName.cs +++ b/src/ResourceMover/generated/api/Support/JobName.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Defines the job name. public partial struct JobName : System.IEquatable { @@ -18,7 +19,7 @@ public partial struct JobName : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new JobName(System.Convert.ToString(value)); + return new JobName(global::System.Convert.ToString(value)); } /// Compares values of enum type JobName diff --git a/src/ResourceMover/generated/api/Support/MoveResourceInputType.Completer.cs b/src/ResourceMover/generated/api/Support/MoveResourceInputType.Completer.cs index cd37bf39d4b9..40793ed971fa 100644 --- a/src/ResourceMover/generated/api/Support/MoveResourceInputType.Completer.cs +++ b/src/ResourceMover/generated/api/Support/MoveResourceInputType.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for MoveResourceInputType. + /// Defines the move resource input type. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputTypeTypeConverter))] public partial struct MoveResourceInputType : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/MoveResourceInputType.TypeConverter.cs b/src/ResourceMover/generated/api/Support/MoveResourceInputType.TypeConverter.cs index 7f0ab179104f..47742f2371c1 100644 --- a/src/ResourceMover/generated/api/Support/MoveResourceInputType.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/MoveResourceInputType.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for MoveResourceInputType. + /// Defines the move resource input type. public partial class MoveResourceInputTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/MoveResourceInputType.cs b/src/ResourceMover/generated/api/Support/MoveResourceInputType.cs index 67d141087ee6..959fc1ac2e10 100644 --- a/src/ResourceMover/generated/api/Support/MoveResourceInputType.cs +++ b/src/ResourceMover/generated/api/Support/MoveResourceInputType.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Defines the move resource input type. public partial struct MoveResourceInputType : System.IEquatable { @@ -20,7 +21,7 @@ public partial struct MoveResourceInputType : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new MoveResourceInputType(System.Convert.ToString(value)); + return new MoveResourceInputType(global::System.Convert.ToString(value)); } /// Compares values of enum type MoveResourceInputType diff --git a/src/ResourceMover/generated/api/Support/MoveState.Completer.cs b/src/ResourceMover/generated/api/Support/MoveState.Completer.cs index 825dea5e6b5e..7e22baf552aa 100644 --- a/src/ResourceMover/generated/api/Support/MoveState.Completer.cs +++ b/src/ResourceMover/generated/api/Support/MoveState.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for MoveState. + /// Defines the MoveResource states. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveStateTypeConverter))] public partial struct MoveState : System.Management.Automation.IArgumentCompleter @@ -78,6 +78,14 @@ public partial struct MoveState : { yield return new global::System.Management.Automation.CompletionResult("Committed", "Committed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Committed"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DeleteSourcePending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("DeleteSourcePending", "DeleteSourcePending", global::System.Management.Automation.CompletionResultType.ParameterValue, "DeleteSourcePending"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ResourceMoveCompleted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("ResourceMoveCompleted", "ResourceMoveCompleted", global::System.Management.Automation.CompletionResultType.ParameterValue, "ResourceMoveCompleted"); + } } } } \ No newline at end of file diff --git a/src/ResourceMover/generated/api/Support/MoveState.TypeConverter.cs b/src/ResourceMover/generated/api/Support/MoveState.TypeConverter.cs index 9a59f659c546..5f59ad655830 100644 --- a/src/ResourceMover/generated/api/Support/MoveState.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/MoveState.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for MoveState. + /// Defines the MoveResource states. public partial class MoveStateTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/MoveState.cs b/src/ResourceMover/generated/api/Support/MoveState.cs index 5bc7e7e4808b..f0ce663ed8f0 100644 --- a/src/ResourceMover/generated/api/Support/MoveState.cs +++ b/src/ResourceMover/generated/api/Support/MoveState.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Defines the MoveResource states. public partial struct MoveState : System.IEquatable { @@ -19,6 +20,8 @@ public partial struct MoveState : public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState Committed = @"Committed"; + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState DeleteSourcePending = @"DeleteSourcePending"; + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState DiscardFailed = @"DiscardFailed"; public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState DiscardInProgress = @"DiscardInProgress"; @@ -35,6 +38,8 @@ public partial struct MoveState : public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState PreparePending = @"PreparePending"; + public static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveState ResourceMoveCompleted = @"ResourceMoveCompleted"; + /// the value for an instance of the Enum. private string _value { get; set; } @@ -42,7 +47,7 @@ public partial struct MoveState : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new MoveState(System.Convert.ToString(value)); + return new MoveState(global::System.Convert.ToString(value)); } /// Compares values of enum type MoveState diff --git a/src/ResourceMover/generated/api/Support/ProvisioningState.Completer.cs b/src/ResourceMover/generated/api/Support/ProvisioningState.Completer.cs index 0d246352debf..41971813a237 100644 --- a/src/ResourceMover/generated/api/Support/ProvisioningState.Completer.cs +++ b/src/ResourceMover/generated/api/Support/ProvisioningState.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for ProvisioningState. + /// Defines the provisioning states. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ProvisioningStateTypeConverter))] public partial struct ProvisioningState : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/ProvisioningState.TypeConverter.cs b/src/ResourceMover/generated/api/Support/ProvisioningState.TypeConverter.cs index 24a4c3afd6f9..e4d6c299a89e 100644 --- a/src/ResourceMover/generated/api/Support/ProvisioningState.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/ProvisioningState.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for ProvisioningState. + /// Defines the provisioning states. public partial class ProvisioningStateTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/ProvisioningState.cs b/src/ResourceMover/generated/api/Support/ProvisioningState.cs index 1597d39dd2c2..f7a6f943d38c 100644 --- a/src/ResourceMover/generated/api/Support/ProvisioningState.cs +++ b/src/ResourceMover/generated/api/Support/ProvisioningState.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Defines the provisioning states. public partial struct ProvisioningState : System.IEquatable { @@ -24,7 +25,7 @@ public partial struct ProvisioningState : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new ProvisioningState(System.Convert.ToString(value)); + return new ProvisioningState(global::System.Convert.ToString(value)); } /// Compares values of enum type ProvisioningState diff --git a/src/ResourceMover/generated/api/Support/ResolutionType.Completer.cs b/src/ResourceMover/generated/api/Support/ResolutionType.Completer.cs index c08d188cb7ee..84170578031a 100644 --- a/src/ResourceMover/generated/api/Support/ResolutionType.Completer.cs +++ b/src/ResourceMover/generated/api/Support/ResolutionType.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for ResolutionType. + /// Defines the resolution type. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResolutionTypeTypeConverter))] public partial struct ResolutionType : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/ResolutionType.TypeConverter.cs b/src/ResourceMover/generated/api/Support/ResolutionType.TypeConverter.cs index 3f0751bfbb03..dc18a7fc1a61 100644 --- a/src/ResourceMover/generated/api/Support/ResolutionType.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/ResolutionType.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for ResolutionType. + /// Defines the resolution type. public partial class ResolutionTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/ResolutionType.cs b/src/ResourceMover/generated/api/Support/ResolutionType.cs index d3732b436733..1023fae2c69d 100644 --- a/src/ResourceMover/generated/api/Support/ResolutionType.cs +++ b/src/ResourceMover/generated/api/Support/ResolutionType.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Defines the resolution type. public partial struct ResolutionType : System.IEquatable { @@ -20,7 +21,7 @@ public partial struct ResolutionType : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new ResolutionType(System.Convert.ToString(value)); + return new ResolutionType(global::System.Convert.ToString(value)); } /// Compares values of enum type ResolutionType diff --git a/src/ResourceMover/generated/api/Support/ResourceIdentityType.Completer.cs b/src/ResourceMover/generated/api/Support/ResourceIdentityType.Completer.cs index 8991908e5a70..c59bb1ff1509 100644 --- a/src/ResourceMover/generated/api/Support/ResourceIdentityType.Completer.cs +++ b/src/ResourceMover/generated/api/Support/ResourceIdentityType.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for ResourceIdentityType. + /// The type of identity used for the resource mover service. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityTypeTypeConverter))] public partial struct ResourceIdentityType : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/ResourceIdentityType.TypeConverter.cs b/src/ResourceMover/generated/api/Support/ResourceIdentityType.TypeConverter.cs index ebffc7d66cc1..b7e0ad1a8658 100644 --- a/src/ResourceMover/generated/api/Support/ResourceIdentityType.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/ResourceIdentityType.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for ResourceIdentityType. + /// The type of identity used for the resource mover service. public partial class ResourceIdentityTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/ResourceIdentityType.cs b/src/ResourceMover/generated/api/Support/ResourceIdentityType.cs index fc440ded25a7..3b2818d9f6a8 100644 --- a/src/ResourceMover/generated/api/Support/ResourceIdentityType.cs +++ b/src/ResourceMover/generated/api/Support/ResourceIdentityType.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// The type of identity used for the resource mover service. public partial struct ResourceIdentityType : System.IEquatable { @@ -22,7 +23,7 @@ public partial struct ResourceIdentityType : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new ResourceIdentityType(System.Convert.ToString(value)); + return new ResourceIdentityType(global::System.Convert.ToString(value)); } /// Compares values of enum type ResourceIdentityType diff --git a/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.Completer.cs b/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.Completer.cs index 35a626a2948d..9ab79167d31d 100644 --- a/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.Completer.cs +++ b/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for TargetAvailabilityZone. + /// Gets or sets the target availability zone. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.TargetAvailabilityZoneTypeConverter))] public partial struct TargetAvailabilityZone : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.TypeConverter.cs b/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.TypeConverter.cs index 1fa073c96419..184c8553806a 100644 --- a/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for TargetAvailabilityZone. + /// Gets or sets the target availability zone. public partial class TargetAvailabilityZoneTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.cs b/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.cs index 7e7bcbf07df9..a196c3146671 100644 --- a/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.cs +++ b/src/ResourceMover/generated/api/Support/TargetAvailabilityZone.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Gets or sets the target availability zone. public partial struct TargetAvailabilityZone : System.IEquatable { @@ -24,7 +25,7 @@ public partial struct TargetAvailabilityZone : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new TargetAvailabilityZone(System.Convert.ToString(value)); + return new TargetAvailabilityZone(global::System.Convert.ToString(value)); } /// Compares values of enum type TargetAvailabilityZone diff --git a/src/ResourceMover/generated/api/Support/ZoneRedundant.Completer.cs b/src/ResourceMover/generated/api/Support/ZoneRedundant.Completer.cs index b768af570291..9e8c039c1982 100644 --- a/src/ResourceMover/generated/api/Support/ZoneRedundant.Completer.cs +++ b/src/ResourceMover/generated/api/Support/ZoneRedundant.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// Argument completer implementation for ZoneRedundant. + /// Defines the zone redundant resource setting. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ZoneRedundantTypeConverter))] public partial struct ZoneRedundant : System.Management.Automation.IArgumentCompleter diff --git a/src/ResourceMover/generated/api/Support/ZoneRedundant.TypeConverter.cs b/src/ResourceMover/generated/api/Support/ZoneRedundant.TypeConverter.cs index 00dfe9ea7dbf..b903d6929881 100644 --- a/src/ResourceMover/generated/api/Support/ZoneRedundant.TypeConverter.cs +++ b/src/ResourceMover/generated/api/Support/ZoneRedundant.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { - /// TypeConverter implementation for ZoneRedundant. + /// Defines the zone redundant resource setting. public partial class ZoneRedundantTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/ResourceMover/generated/api/Support/ZoneRedundant.cs b/src/ResourceMover/generated/api/Support/ZoneRedundant.cs index 279acba0b471..508dddad1fb1 100644 --- a/src/ResourceMover/generated/api/Support/ZoneRedundant.cs +++ b/src/ResourceMover/generated/api/Support/ZoneRedundant.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support { + /// Defines the zone redundant resource setting. public partial struct ZoneRedundant : System.IEquatable { @@ -20,7 +21,7 @@ public partial struct ZoneRedundant : /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new ZoneRedundant(System.Convert.ToString(value)); + return new ZoneRedundant(global::System.Convert.ToString(value)); } /// Compares values of enum type ZoneRedundant diff --git a/src/ResourceMover/generated/cmdlets/AddAzResourceMoverMoveResource_CreateExpanded.cs b/src/ResourceMover/generated/cmdlets/AddAzResourceMoverMoveResource_CreateExpanded.cs index 7d1f715935b1..27e0db60650a 100644 --- a/src/ResourceMover/generated/cmdlets/AddAzResourceMoverMoveResource_CreateExpanded.cs +++ b/src/ResourceMover/generated/cmdlets/AddAzResourceMoverMoveResource_CreateExpanded.cs @@ -9,10 +9,11 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Creates or updates a Move Resource in the move collection. /// - /// [OpenAPI] MoveResources_Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}" + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzResourceMoverMoveResource_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource))] + [global::System.Management.Automation.Alias("Update-AzResourceMoverMoveResource")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Creates or updates a Move Resource in the move collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class AddAzResourceMoverMoveResource_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -38,10 +39,10 @@ public partial class AddAzResourceMoverMoveResource_CreateExpanded : global::Sys public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveResource(); /// Defines the move resource. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource Body { get => this._body; set => this._body = value; } + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource 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")] @@ -69,8 +70,8 @@ public partial class AddAzResourceMoverMoveResource_CreateExpanded : global::Sys ReadOnly = false, Description = @"Gets or sets the move resource dependencies overrides.", SerializedName = @"dependsOnOverrides", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride) })] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] DependsOnOverride { get => Body.DependsOnOverride ?? null /* arrayOf */; set => Body.DependsOnOverride = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride) })] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] DependsOnOverride { get => Body.DependsOnOverride ?? null /* arrayOf */; set => Body.DependsOnOverride = value; } /// Gets or sets the existing target ARM Id of the resource. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets the existing target ARM Id of the resource.")] @@ -178,29 +179,16 @@ public partial class AddAzResourceMoverMoveResource_CreateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource type. For example, the value can be Microsoft.Compute/virtualMachines.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource type. For example, the value can be Microsoft.Compute/virtualMachines.", - SerializedName = @"resourceType", - PossibleTypes = new [] { typeof(string) })] - public string ResourceSettingResourceType { get => Body.ResourceSettingResourceType ?? null; set => Body.ResourceSettingResourceType = value; } - - /// Gets or sets the target Resource name. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets the target Resource name.")] + /// Gets or sets the resource settings. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets the resource settings.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Gets or sets the target Resource name.", - SerializedName = @"targetResourceName", - PossibleTypes = new [] { typeof(string) })] - public string ResourceSettingTargetResourceName { get => Body.ResourceSettingTargetResourceName ?? null; set => Body.ResourceSettingTargetResourceName = value; } + Description = @"Gets or sets the resource settings.", + SerializedName = @"resourceSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings ResourceSetting { get => Body.ResourceSetting ?? null /* object */; set => Body.ResourceSetting = value; } /// Gets or sets the Source ARM Id of the resource. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets the Source ARM Id of the resource.")] @@ -213,30 +201,6 @@ public partial class AddAzResourceMoverMoveResource_CreateExpanded : global::Sys PossibleTypes = new [] { typeof(string) })] public string SourceId { get => Body.SourceId ?? null; set => Body.SourceId = value; } - /// - /// The resource type. For example, the value can be Microsoft.Compute/virtualMachines. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource type. For example, the value can be Microsoft.Compute/virtualMachines.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource type. For example, the value can be Microsoft.Compute/virtualMachines.", - SerializedName = @"resourceType", - PossibleTypes = new [] { typeof(string) })] - public string SourceResourceSettingResourceType { get => Body.SourceResourceSettingResourceType ?? null; set => Body.SourceResourceSettingResourceType = value; } - - /// Gets or sets the target Resource name. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets the target Resource name.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Gets or sets the target Resource name.", - SerializedName = @"targetResourceName", - PossibleTypes = new [] { typeof(string) })] - public string SourceResourceSettingTargetResourceName { get => Body.SourceResourceSettingTargetResourceName ?? null; set => Body.SourceResourceSettingTargetResourceName = value; } - /// Backing field for property. private string _subscriptionId; @@ -260,24 +224,24 @@ public partial class AddAzResourceMoverMoveResource_CreateExpanded : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// Intializes a new instance of the cmdlet class. @@ -504,12 +468,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -526,7 +490,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, Name=Name, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -544,12 +508,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -561,7 +525,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_Get.cs b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_Get.cs index a8f220932d58..18d0258c5119 100644 --- a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_Get.cs +++ b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_Get.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Gets the move collection. /// - /// [OpenAPI] MoveCollections_Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceMoverMoveCollection_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Gets the move collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class GetAzResourceMoverMoveCollection_Get : global::System.Management.Automation.PSCmdlet, @@ -145,24 +145,24 @@ public partial class GetAzResourceMoverMoveCollection_Get : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -334,12 +334,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -356,7 +356,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -374,12 +374,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,7 +391,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List.cs b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List.cs index e5b54aea9ae6..86bafc08a03b 100644 --- a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List.cs +++ b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Get all the Move Collections in the subscription. /// - /// [OpenAPI] MoveCollections_ListMoveCollectionsBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.Migrate/moveCollections" + /// [OpenAPI] ListMoveCollectionsBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.Migrate/moveCollections" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceMoverMoveCollection_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Get all the Move Collections in the subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class GetAzResourceMoverMoveCollection_List : global::System.Management.Automation.PSCmdlet, @@ -116,24 +116,24 @@ public partial class GetAzResourceMoverMoveCollection_List : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -305,12 +305,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -327,7 +327,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -345,12 +345,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List1.cs b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List1.cs index 8935dcddaa51..f06c79a3a524 100644 --- a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List1.cs +++ b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveCollection_List1.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Get all the Move Collections in the resource group. /// - /// [OpenAPI] MoveCollections_ListMoveCollectionsByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections" + /// [OpenAPI] ListMoveCollectionsByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceMoverMoveCollection_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Get all the Move Collections in the resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class GetAzResourceMoverMoveCollection_List1 : global::System.Management.Automation.PSCmdlet, @@ -130,24 +130,24 @@ public partial class GetAzResourceMoverMoveCollection_List1 : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -319,12 +319,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -341,7 +341,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -359,12 +359,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_Get.cs b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_Get.cs index 67f4fd4e12f1..15743dc69690 100644 --- a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_Get.cs +++ b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_Get.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Gets the Move Resource. /// - /// [OpenAPI] MoveResources_Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceMoverMoveResource_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Gets the Move Resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class GetAzResourceMoverMoveResource_Get : global::System.Management.Automation.PSCmdlet, @@ -159,24 +159,24 @@ public partial class GetAzResourceMoverMoveResource_Get : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -348,12 +348,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -370,7 +370,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -388,12 +388,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -405,7 +405,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_List.cs b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_List.cs index a0e33a451710..dcab6e795431 100644 --- a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_List.cs +++ b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverMoveResource_List.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Lists the Move Resources in the move collection. /// - /// [OpenAPI] MoveResources_List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources" + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceMoverMoveResource_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Lists the Move Resources in the move collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class GetAzResourceMoverMoveResource_List : global::System.Management.Automation.PSCmdlet, @@ -160,24 +160,24 @@ public partial class GetAzResourceMoverMoveResource_List : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -349,12 +349,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -371,7 +371,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -389,12 +389,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverRequiredForResources_List.cs b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverRequiredForResources_List.cs new file mode 100644 index 000000000000..0212fd9ed172 --- /dev/null +++ b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverRequiredForResources_List.cs @@ -0,0 +1,413 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// List of the move resources for which an arm resource is required for. + /// + /// [OpenAPI] ListRequiredFor=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/requiredFor" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceMoverRequiredForResources_List")] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"List of the move resources for which an arm resource is required for.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] + public partial class GetAzResourceMoverRequiredForResources_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ResourceMover Client => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _moveCollectionName; + + /// The Move Collection Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Move Collection Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Move Collection Name.", + SerializedName = @"moveCollectionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Path)] + public string MoveCollectionName { get => this._moveCollectionName; set => this._moveCollectionName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The Resource Group Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Resource Group Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Resource Group Name.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _sourceId; + + /// The sourceId for which the api is invoked. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The sourceId for which the api is invoked.")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The sourceId for which the api is invoked.", + SerializedName = @"sourceId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Query)] + public string SourceId { get => this._sourceId; set => this._sourceId = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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 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 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() + { + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzResourceMoverRequiredForResources_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.ResourceMover.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.ResourceMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data, new[] { data.Message }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MoveCollectionsListRequiredFor(SubscriptionId, ResourceGroupName, MoveCollectionName, SourceId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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,MoveCollectionName=MoveCollectionName,SourceId=SourceId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// 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 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.ResourceMover.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, SourceId=SourceId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, SourceId=SourceId }) + { + 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 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 + // response should be returning an array of some kind. +Pageable + // nested-array / sourceIds / + WriteObject((await response).SourceId, true); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverUnresolvedDependency_Get.cs b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverUnresolvedDependency_Get.cs index 847512f9f9a9..be1c2eeff0a6 100644 --- a/src/ResourceMover/generated/cmdlets/GetAzResourceMoverUnresolvedDependency_Get.cs +++ b/src/ResourceMover/generated/cmdlets/GetAzResourceMoverUnresolvedDependency_Get.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Gets a list of unresolved dependencies. /// - /// [OpenAPI] UnresolvedDependencies_Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/unresolvedDependencies" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/unresolvedDependencies" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzResourceMoverUnresolvedDependency_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Gets a list of unresolved dependencies.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class GetAzResourceMoverUnresolvedDependency_Get : global::System.Management.Automation.PSCmdlet, @@ -49,6 +49,35 @@ public partial class GetAzResourceMoverUnresolvedDependency_Get : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel _dependencyLevel; + + /// Defines the dependency level. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the dependency level.")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the dependency level.", + SerializedName = @"dependencyLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel))] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel DependencyLevel { get => this._dependencyLevel; set => this._dependencyLevel = value; } + + /// Backing field for property. + private string _filter; + + /// The filter to apply on the operation. For example, $apply=filter(count eq 2). + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The filter to apply on the operation. For example, $apply=filter(count eq 2).")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The filter to apply on the operation. For example, $apply=filter(count eq 2).", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,6 +115,20 @@ public partial class GetAzResourceMoverUnresolvedDependency_Get : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Path)] public string MoveCollectionName { get => this._moveCollectionName; set => this._moveCollectionName = value; } + /// Backing field for property. + private string _orderby; + + /// OData order by query option. For example, you can use $orderby=Count desc. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "OData order by query option. For example, you can use $orderby=Count desc.")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"OData order by query option. For example, you can use $orderby=Count desc.", + SerializedName = @"$orderby", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Query)] + public string Orderby { get => this._orderby; set => this._orderby = value; } + /// /// The instance of the that the remote call will use. /// @@ -144,24 +187,24 @@ public partial class GetAzResourceMoverUnresolvedDependency_Get : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -304,13 +347,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.UnresolvedDependenciesGet(SubscriptionId, ResourceGroupName, MoveCollectionName, onOk, onDefault, this, Pipeline); + await this.Client.UnresolvedDependenciesGet(SubscriptionId, ResourceGroupName, MoveCollectionName, this.InvocationInformation.BoundParameters.ContainsKey("DependencyLevel") ? DependencyLevel : null, this.InvocationInformation.BoundParameters.ContainsKey("Orderby") ? Orderby : null, this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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,MoveCollectionName=MoveCollectionName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,MoveCollectionName=MoveCollectionName,DependencyLevel=this.InvocationInformation.BoundParameters.ContainsKey("DependencyLevel") ? DependencyLevel : null,Orderby=this.InvocationInformation.BoundParameters.ContainsKey("Orderby") ? Orderby : null,Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -333,12 +376,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -355,15 +398,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, DependencyLevel=this.InvocationInformation.BoundParameters.ContainsKey("DependencyLevel") ? DependencyLevel : null, Orderby=this.InvocationInformation.BoundParameters.ContainsKey("Orderby") ? Orderby : null, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, DependencyLevel=this.InvocationInformation.BoundParameters.ContainsKey("DependencyLevel") ? DependencyLevel : null, Orderby=this.InvocationInformation.BoundParameters.ContainsKey("Orderby") ? Orderby : null, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -373,12 +416,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,7 +434,7 @@ protected override void StopProcessing() } // onOk - response for 200 / application/json // response should be returning an array of some kind. +Pageable - // nested-array / value / nextLink + // pageable / value / nextLink var result = await response; WriteObject(result.Value,true); if (result.NextLink != null) diff --git a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverBulkRemove_BulkExpanded.cs b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverBulkRemove_BulkExpanded.cs new file mode 100644 index 000000000000..8dd0344716cc --- /dev/null +++ b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverBulkRemove_BulkExpanded.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Extensions; + + /// + /// Removes the set of move resources included in the request body from move collection. The orchestration is done by service. + /// To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. + /// + /// + /// [OpenAPI] BulkRemove=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/bulkRemove" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzResourceMoverBulkRemove_BulkExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Removes the set of move resources included in the request body from move collection. The orchestration is done by service. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] + public partial class InvokeAzResourceMoverBulkRemove_BulkExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// 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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.BulkRemoveRequest(); + + /// Defines the request body for bulk remove of move resources operation. + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IBulkRemoveRequest 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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ResourceMover Client => Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _moveCollectionName; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"moveCollectionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Path)] + public string MoveCollectionName { get => this._moveCollectionName; set => this._moveCollectionName = value; } + + /// + /// Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via + /// moveResourceInputType property. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.", + SerializedName = @"moveResources", + PossibleTypes = new [] { typeof(string) })] + public string[] MoveResource { get => Body.MoveResource ?? null /* arrayOf */; set => Body.MoveResource = value; } + + /// Defines the move resource input type. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the move resource input type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the move resource input type.", + SerializedName = @"moveResourceInputType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType))] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType MoveResourceInputType { get => Body.MoveResourceInputType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType)""); set => Body.MoveResourceInputType = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Gets or sets a value indicating whether the operation needs to only run pre-requisite. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets a value indicating whether the operation needs to only run pre-requisite.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets a value indicating whether the operation needs to only run pre-requisite.", + SerializedName = @"validateOnly", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter ValidateOnly { get => Body.ValidateOnly ?? default(global::System.Management.Automation.SwitchParameter); set => Body.ValidateOnly = 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 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 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() + { + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzResourceMoverBulkRemove_BulkExpanded + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets.InvokeAzResourceMoverBulkRemove_BulkExpanded Clone() + { + var clone = new InvokeAzResourceMoverBulkRemove_BulkExpanded(); + 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.Body = this.Body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.MoveCollectionName = this.MoveCollectionName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzResourceMoverBulkRemove_BulkExpanded() + { + + } + + /// 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.ResourceMover.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.ResourceMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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.ResourceMover.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'MoveCollectionsBulkRemove' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.MoveCollectionsBulkRemove(SubscriptionId, ResourceGroupName, MoveCollectionName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.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,MoveCollectionName=MoveCollectionName,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// 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 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.ResourceMover.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, body=Body }) + { + 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 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.ResourceMover.Models.Api202101.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverCommit_CommitExpanded.cs b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverCommit_CommitExpanded.cs index 1a939af9270b..cd9275315d6a 100644 --- a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverCommit_CommitExpanded.cs +++ b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverCommit_CommitExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// to true. /// /// - /// [OpenAPI] MoveCollections_Commit=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/commit" + /// [OpenAPI] Commit=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/commit" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzResourceMoverCommit_CommitExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Commits the set of resources included in the request body. The commit operation is triggered on the moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful completion the moveResource moveState do a transition to Committed. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class InvokeAzResourceMoverCommit_CommitExpanded : global::System.Management.Automation.PSCmdlet, @@ -43,10 +43,10 @@ public partial class InvokeAzResourceMoverCommit_CommitExpanded : global::System public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.CommitRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.CommitRequest(); /// Defines the request body for commit operation. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ICommitRequest Body { get => this._body; set => this._body = value; } + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ICommitRequest 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")] @@ -208,24 +208,24 @@ public partial class InvokeAzResourceMoverCommit_CommitExpanded : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -451,12 +451,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -473,7 +473,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -491,12 +491,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -508,7 +508,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverDiscard_DiscardExpanded.cs b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverDiscard_DiscardExpanded.cs index f7e7f9091dd4..2cc3da82df09 100644 --- a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverDiscard_DiscardExpanded.cs +++ b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverDiscard_DiscardExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// set to true. /// /// - /// [OpenAPI] MoveCollections_Discard=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/discard" + /// [OpenAPI] Discard=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/discard" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzResourceMoverDiscard_DiscardExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Discards the set of resources included in the request body. The discard operation is triggered on the moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class InvokeAzResourceMoverDiscard_DiscardExpanded : global::System.Management.Automation.PSCmdlet, @@ -43,10 +43,10 @@ public partial class InvokeAzResourceMoverDiscard_DiscardExpanded : global::Syst public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.DiscardRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.DiscardRequest(); /// Defines the request body for discard operation. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IDiscardRequest Body { get => this._body; set => this._body = value; } + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IDiscardRequest 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")] @@ -209,24 +209,24 @@ public partial class InvokeAzResourceMoverDiscard_DiscardExpanded : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -452,12 +452,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -474,7 +474,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -492,12 +492,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -509,7 +509,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverInitiateMove_InitiateExpanded.cs b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverInitiateMove_InitiateExpanded.cs index 536ddc951bd7..b46700308565 100644 --- a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverInitiateMove_InitiateExpanded.cs +++ b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverInitiateMove_InitiateExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// set to true. /// /// - /// [OpenAPI] MoveCollections_InitiateMove=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/initiateMove" + /// [OpenAPI] InitiateMove=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/initiateMove" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzResourceMoverInitiateMove_InitiateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Moves the set of resources included in the request body. The move operation is triggered after the moveResources are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class InvokeAzResourceMoverInitiateMove_InitiateExpanded : global::System.Management.Automation.PSCmdlet, @@ -43,10 +43,10 @@ public partial class InvokeAzResourceMoverInitiateMove_InitiateExpanded : global public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.ResourceMoveRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceMoveRequest(); /// Defines the request body for resource move operation. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IResourceMoveRequest Body { get => this._body; set => this._body = value; } + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceMoveRequest 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")] @@ -208,24 +208,24 @@ public partial class InvokeAzResourceMoverInitiateMove_InitiateExpanded : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -451,12 +451,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -473,7 +473,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -491,12 +491,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -508,7 +508,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverPrepare_PrepareExpanded.cs b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverPrepare_PrepareExpanded.cs index 8b7683cabb86..60f27db528d9 100644 --- a/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverPrepare_PrepareExpanded.cs +++ b/src/ResourceMover/generated/cmdlets/InvokeAzResourceMoverPrepare_PrepareExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// property set to true. /// /// - /// [OpenAPI] MoveCollections_Prepare=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/prepare" + /// [OpenAPI] Prepare=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/prepare" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzResourceMoverPrepare_PrepareExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Initiates prepare for the set of resources included in the request body. The prepare operation is on the moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class InvokeAzResourceMoverPrepare_PrepareExpanded : global::System.Management.Automation.PSCmdlet, @@ -43,10 +43,10 @@ public partial class InvokeAzResourceMoverPrepare_PrepareExpanded : global::Syst public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.PrepareRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.PrepareRequest(); /// Defines the request body for initiate prepare operation. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IPrepareRequest Body { get => this._body; set => this._body = value; } + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IPrepareRequest 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")] @@ -208,24 +208,24 @@ public partial class InvokeAzResourceMoverPrepare_PrepareExpanded : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -451,12 +451,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -473,7 +473,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -491,12 +491,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -508,7 +508,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/NewAzResourceMoverMoveCollection_CreateExpanded.cs b/src/ResourceMover/generated/cmdlets/NewAzResourceMoverMoveCollection_CreateExpanded.cs index b20bcaa2407f..4281136e6d65 100644 --- a/src/ResourceMover/generated/cmdlets/NewAzResourceMoverMoveCollection_CreateExpanded.cs +++ b/src/ResourceMover/generated/cmdlets/NewAzResourceMoverMoveCollection_CreateExpanded.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Creates or updates a move collection. /// - /// [OpenAPI] MoveCollections_Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}" + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzResourceMoverMoveCollection_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Creates or updates a move collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class NewAzResourceMoverMoveCollection_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -33,10 +33,10 @@ public partial class NewAzResourceMoverMoveCollection_CreateExpanded : global::S private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.MoveCollection(); + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection _body= new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.MoveCollection(); /// Define the move collection. - private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection Body { get => this._body; set => this._body = value; } + private Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection 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")] @@ -89,13 +89,13 @@ public partial class NewAzResourceMoverMoveCollection_CreateExpanded : global::S PossibleTypes = new [] { typeof(string) })] public string IdentityTenantId { get => Body.IdentityTenantId ?? null; set => Body.IdentityTenantId = value; } - /// The type of identity used for the region move service. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of identity used for the region move service.")] + /// The type of identity used for the resource mover service. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of identity used for the resource mover service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The type of identity used for the region move service.", + Description = @"The type of identity used for the resource mover service.", SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType))] @@ -211,8 +211,8 @@ public partial class NewAzResourceMoverMoveCollection_CreateExpanded : global::S ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollectionTags Tag { get => Body.Tag ?? null /* object */; set => Body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollectionTags Tag { get => Body.Tag ?? null /* object */; set => Body.Tag = value; } /// Gets or sets the target region. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Gets or sets the target region.")] @@ -230,36 +230,36 @@ public partial class NewAzResourceMoverMoveCollection_CreateExpanded : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// 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 the body result as a 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); + 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 the body result as a 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); + 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) @@ -429,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -446,7 +446,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection WriteObject((await response)); } } @@ -455,12 +455,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,7 +477,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -495,12 +495,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -512,7 +512,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveCollection_Delete.cs b/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveCollection_Delete.cs index b638dd143d12..1e4985277429 100644 --- a/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveCollection_Delete.cs +++ b/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveCollection_Delete.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Deletes a move collection. /// - /// [OpenAPI] MoveCollections_Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}" + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzResourceMoverMoveCollection_Delete", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Deletes a move collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class RemoveAzResourceMoverMoveCollection_Delete : global::System.Management.Automation.PSCmdlet, @@ -165,12 +165,12 @@ public partial class RemoveAzResourceMoverMoveCollection_Delete : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 @@ -187,12 +187,12 @@ public partial class RemoveAzResourceMoverMoveCollection_Delete : global::System /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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) @@ -417,12 +417,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -439,7 +439,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -481,12 +481,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -498,7 +498,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveResource_Delete.cs b/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveResource_Delete.cs index 4c3228ed2040..84136d9fd70b 100644 --- a/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveResource_Delete.cs +++ b/src/ResourceMover/generated/cmdlets/RemoveAzResourceMoverMoveResource_Delete.cs @@ -9,10 +9,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Deletes a Move Resource from the move collection. /// - /// [OpenAPI] MoveResources_Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}" + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzResourceMoverMoveResource_Delete", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Deletes a Move Resource from the move collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class RemoveAzResourceMoverMoveResource_Delete : global::System.Management.Automation.PSCmdlet, @@ -179,12 +179,12 @@ public partial class RemoveAzResourceMoverMoveResource_Delete : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 @@ -201,12 +201,12 @@ public partial class RemoveAzResourceMoverMoveResource_Delete : global::System.M /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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) @@ -432,12 +432,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -454,7 +454,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -496,12 +496,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -513,7 +513,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/cmdlets/ResolveAzResourceMoverMoveCollectionDependency_Resolve.cs b/src/ResourceMover/generated/cmdlets/ResolveAzResourceMoverMoveCollectionDependency_Resolve.cs index 64255f277983..32c701ad2b07 100644 --- a/src/ResourceMover/generated/cmdlets/ResolveAzResourceMoverMoveCollectionDependency_Resolve.cs +++ b/src/ResourceMover/generated/cmdlets/ResolveAzResourceMoverMoveCollectionDependency_Resolve.cs @@ -11,10 +11,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Cmdlets /// Computes, resolves and validate the dependencies of the moveResources in the move collection. /// /// - /// [OpenAPI] MoveCollections_ResolveDependencies=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/resolveDependencies" + /// [OpenAPI] ResolveDependencies=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/resolveDependencies" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Resolve, @"AzResourceMoverMoveCollectionDependency_Resolve", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Description(@"Computes, resolves and validate the dependencies of the moveResources in the move collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Generated] public partial class ResolveAzResourceMoverMoveCollectionDependency_Resolve : global::System.Management.Automation.PSCmdlet, @@ -159,24 +159,24 @@ public partial class ResolveAzResourceMoverMoveCollectionDependency_Resolve : gl /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a the body result as a 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); + 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 the body result as a 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); + 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) @@ -401,12 +401,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, MoveCollectionName=MoveCollectionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -441,12 +441,12 @@ protected override void StopProcessing() /// 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 the body result as a 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +458,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus WriteObject((await response)); } } diff --git a/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index e60e41344c76..1a14996ffc56 100644 --- a/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -42,7 +42,7 @@ public class ExportProxyCmdlet : PSCmdlet [ValidateNotNullOrEmpty] public string DocsFolder { get; set; } - [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [Parameter(Mandatory = true)] [ValidateNotNullOrEmpty] public string ExamplesFolder { get; set; } diff --git a/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index c27c771e7897..54a7e6d9fced 100644 --- a/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/ResourceMover/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -12,114 +12,180 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "Psd1")] - [DoNotExport] - public class ExportPsd1 : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string CustomFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string Psd1Path { get; set; } - - [Parameter(Mandatory = true)] - public Guid ModuleGuid { get; set; } - - private static readonly bool IsAzure = Convert.ToBoolean(@"true"); - private const string CustomFolderRelative = "./custom"; - private const string Indent = Psd1Indent; - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "Psd1")] + [DoNotExport] + public class ExportPsd1 : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } - if (!Directory.Exists(CustomFolder)) - { - throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CustomFolder { get; set; } - string version = Convert.ToString(@"0.1.0"); - // Validate the module version should be semantic version - // Following regex is official from https://semver.org/ - Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); - if (rx.Matches(version).Count != 1) - { - throw new ArgumentException("Module-version is not a valid Semantic Version"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } - string previewVersion = null; - if (version.Contains('-')) - { - string[] versions = version.Split("-".ToCharArray(), 2); - version = versions[0]; - previewVersion = versions[1]; - } + [Parameter(Mandatory = true)] + public Guid ModuleGuid { get; set; } - var sb = new StringBuilder(); - sb.AppendLine("@{"); - sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); - sb.AppendLine($@"{Indent}RootModule = '{"./Az.ResourceMover.psm1"}'"); - sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); - sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); - sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); - sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); - sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); - sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: ResourceMover cmdlets"}'"); - sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); - sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); - sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.ResourceMover.private.dll"}'"); - - var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) - .Where(f => f.EndsWith(".format.ps1xml")) - .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); - var formatList = customFormatPs1xmlFiles.Prepend("./Az.ResourceMover.format.ps1xml").ToPsList(); - sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); - - var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); - - sb.AppendLine($@"{Indent}PrivateData = @{{"); - sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); - - if (previewVersion != null) - { - sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); - } - sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule ResourceMover".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); - sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); - sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); - sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); - var profilesList = ""; - if (IsAzure && !String.IsNullOrEmpty(profilesList)) + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private const string CustomFolderRelative = "./custom"; + private const string Indent = Psd1Indent; + private const string Undefined = "undefined"; + private bool IsUndefined(string value) => string.Equals(Undefined, value, StringComparison.OrdinalIgnoreCase); + + protected override void ProcessRecord() { - sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + if (!Directory.Exists(CustomFolder)) + { + throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); + } + + string version = Convert.ToString(@"0.1.0"); + // Validate the module version should be semantic version + // Following regex is official from https://semver.org/ + Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); + if (rx.Matches(version).Count != 1) + { + throw new ArgumentException("Module-version is not a valid Semantic Version"); + } + + string previewVersion = null; + if (version.Contains('-')) + { + string[] versions = version.Split("-".ToCharArray(), 2); + version = versions[0]; + previewVersion = versions[1]; + } + + var sb = new StringBuilder(); + sb.AppendLine("@{"); + sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); + sb.AppendLine($@"{Indent}RootModule = '{"./Az.ResourceMover.psm1"}'"); + sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); + sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); + sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); + sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: ResourceMover cmdlets"}'"); + sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); + sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); + + // RequiredModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredModules = @({"undefined"})"); + } + + // RequiredAssemblies + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredAssemblies = @({"undefined"})"); + } + else + { + sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.ResourceMover.private.dll"}'"); + } + + // NestedModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}NestedModules = @({"undefined"})"); + } + + // FormatsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FormatsToProcess = @({"undefined"})"); + } + else + { + var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) + .Where(f => f.EndsWith(".format.ps1xml")) + .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); + var formatList = customFormatPs1xmlFiles.Prepend("./Az.ResourceMover.format.ps1xml").ToPsList(); + sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); + } + + // TypesToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}TypesToProcess = @({"undefined"})"); + } + + // ScriptsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}ScriptsToProcess = @({"undefined"})"); + } + + var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); + // FunctionsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FunctionsToExport = @({"undefined"})"); + } + else + { + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); + } + + // AliasesToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}AliasesToExport = @({"undefined"})"); + } + else + { + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } + + // CmdletsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}CmdletsToExport = @({"undefined"})"); + } + + sb.AppendLine($@"{Indent}PrivateData = @{{"); + sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); + + if (previewVersion != null) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); + } + sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule ResourceMover".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); + var profilesList = ""; + if (IsAzure && !String.IsNullOrEmpty(profilesList)) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + } + + sb.AppendLine($@"{Indent}{Indent}}}"); + sb.AppendLine($@"{Indent}}}"); + sb.AppendLine(@"}"); + + File.WriteAllText(Psd1Path, sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } } - - sb.AppendLine($@"{Indent}{Indent}}}"); - sb.AppendLine($@"{Indent}}}"); - sb.AppendLine(@"}"); - - File.WriteAllText(Psd1Path, sb.ToString()); - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } diff --git a/src/ResourceMover/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/ResourceMover/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs index f1d2b76d34b8..0a22c974f27e 100644 --- a/src/ResourceMover/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs +++ b/src/ResourceMover/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -113,7 +113,7 @@ internal class ModulePageMetadataOutput { public PsModuleHelpInfo ModuleInfo { get; } - private static string HelpLinkPrefix { get; } = @"https://docs.microsoft.com/en-us/powershell/module/"; + private static string HelpLinkPrefix { get; } = @"https://docs.microsoft.com/powershell/module/"; public ModulePageMetadataOutput(PsModuleHelpInfo moduleInfo) { diff --git a/src/ResourceMover/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/ResourceMover/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 73fdb02ed817..b06c1d33c364 100644 --- a/src/ResourceMover/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/ResourceMover/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -363,7 +363,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } - private const string HelpLinkPrefix = @"https://docs.microsoft.com/en-us/powershell/module/"; + private const string HelpLinkPrefix = @"https://docs.microsoft.com/powershell/module/"; public CommentInfo(VariantGroup variantGroup) { diff --git a/src/ResourceMover/generated/runtime/PipelineMocking.cs b/src/ResourceMover/generated/runtime/PipelineMocking.cs index bb3ee6597641..6066386c5ea6 100644 --- a/src/ResourceMover/generated/runtime/PipelineMocking.cs +++ b/src/ResourceMover/generated/runtime/PipelineMocking.cs @@ -81,9 +81,9 @@ public void PushScenario(string it) internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); - internal static JsonNode SerializeContent(HttpContent content) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result); + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); - internal static JsonNode SerializeContent(byte[] content) + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) { if (null == content || content.Length == 0) { @@ -102,14 +102,14 @@ internal static JsonNode SerializeContent(byte[] content) return new JsonString(System.Convert.ToBase64String(content)); } - internal static byte[] DeserializeContent(string content) + internal static byte[] DeserializeContent(string content, bool isBase64) { if (string.IsNullOrWhiteSpace(content)) { return new byte[0]; } - if (content.EndsWith("==")) + if (isBase64) { try { @@ -126,11 +126,14 @@ internal static byte[] DeserializeContent(string content) public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) { var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; messages[rqKey] = new JsonObject { { "Request",new JsonObject { { "Method", request.Method.Method }, { "RequestUri", request.RequestUri }, - { "Content", SerializeContent( request.Content) }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} } }, @@ -138,7 +141,8 @@ public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMe { "StatusCode", (int)response.StatusCode}, { "Headers", new JsonObject(FilterHeaders(response.Headers))}, { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, - { "Content", SerializeContent(response.Content) }, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, }} }; System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); @@ -176,10 +180,12 @@ public HttpResponseMessage LoadMessage(string rqKey) var respMessage = message.Property("Response"); // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); var response = new HttpResponseMessage { StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), - Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"))) + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) }; foreach (var each in respMessage.Property("Headers")) @@ -199,11 +205,13 @@ public HttpResponseMessage LoadMessage(string rqKey) } // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); response.RequestMessage = new HttpRequestMessage { Method = new HttpMethod(reqMessage.StringProperty("Method")), RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), - Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"))) + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) }; foreach (var each in reqMessage.Property("Headers")) diff --git a/src/ResourceMover/generated/runtime/UndeclaredResponseException.cs b/src/ResourceMover/generated/runtime/UndeclaredResponseException.cs index 089d178991d3..9be135e4e09e 100644 --- a/src/ResourceMover/generated/runtime/UndeclaredResponseException.cs +++ b/src/ResourceMover/generated/runtime/UndeclaredResponseException.cs @@ -42,8 +42,13 @@ public RestException(System.Net.Http.HttpResponseMessage response) // try to parse the body as JSON, and see if a code and message are in there. var json = Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Runtime.Json.JsonObject; + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + // see if there is an error block in the body - json = json.Property("error") ?? json; + json = json?.Property("error") ?? json; { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } diff --git a/src/ResourceMover/help/Add-AzResourceMoverMoveResource.md b/src/ResourceMover/help/Add-AzResourceMoverMoveResource.md index a63ac68b1e34..9dc654a75a72 100644 --- a/src/ResourceMover/help/Add-AzResourceMoverMoveResource.md +++ b/src/ResourceMover/help/Add-AzResourceMoverMoveResource.md @@ -15,9 +15,7 @@ Creates or updates a Move Resource in the move collection. ``` Add-AzResourceMoverMoveResource -MoveCollectionName -Name -ResourceGroupName [-SubscriptionId ] [-DependsOnOverride ] - [-ExistingTargetId ] [-ResourceSettingResourceType ] - [-ResourceSettingTargetResourceName ] [-SourceId ] - [-SourceResourceSettingResourceType ] [-SourceResourceSettingTargetResourceName ] + [-ExistingTargetId ] [-ResourceSetting ] [-SourceId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -26,47 +24,111 @@ Creates or updates a Move Resource in the move collection. ## EXAMPLES -### Example 1: Adding a resource to the move collection. +### Example 1: Add a resource to the Move Collection. ```powershell -PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name PSDemoVM -ResourceSettingResourceType "Microsoft.Compute/virtualMachines" -ResourceSettingTargetResourceName PSDemoVM - -Output: - -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migr - ate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : DependencyComputationPending -MoveStatusDetail : {} -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resou - rceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. - Possible Causes: Dependency computation is pending for resource. - Recommended Action: Validate dependencies to compute the dependencies. - -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachi - nes/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $targetResourceSettingsObj + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : DependencyComputationPending +MoveStatusErrorsPropertiesDetail : {} +MoveStatusErrorsPropertiesMessage : The dependency computation is not completed for resource - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. Possible Causes: Dependency computation is pending for resource. Recommended Action: Validate dependencies to compute the dependencies. +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $targetResourceSettingsObj = New-Object Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +PS C:\> $targetResourceSettingsObj.ResourceType = "Microsoft.Compute/virtualMachines" +$targetResourceSettingsObj.TargetResourceName = "PSDemoVM" ``` -Adding a resource to the move collection within the specified subscription. +Add a resource to the Move Collection. + +### Example 2: Add a resource to the Move Collection that has existing target resource. +```powershell +PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm" -Name "psdemorm" -ExistingTargetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target" + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : CommitPending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : +Type : + +``` + +Add a resource to the Move Collection that has existing target resource. + +### Example 3: Update target resource settings after the Move Resource has been added. +```powershell +PS C:\> Update-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $TargetResourceSettingObj + + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : True +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +PS C:\> $moveResourceObj = Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" +PS C:\> $TargetResourceSettingObj = $moveResourceObj.ResourceSetting +$TargetResourceSettingObj.TargetResourceName="PSDemoVM-target" + +``` + +Update target resource settings after the Move Resource has been added. ## PARAMETERS @@ -105,7 +167,7 @@ Gets or sets the move resource dependencies overrides. To construct, see NOTES section for DEPENDSONOVERRIDE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResourceDependencyOverride[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResourceDependencyOverride[] Parameter Sets: (All) Aliases: @@ -191,27 +253,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ResourceSettingResourceType -The resource type. -For example, the value can be Microsoft.Compute/virtualMachines. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceSettingTargetResourceName -Gets or sets the target Resource name. +### -ResourceSetting +Gets or sets the resource settings. +To construct, see NOTES section for RESOURCESETTING properties and create a hash table. ```yaml -Type: System.String +Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IResourceSettings Parameter Sets: (All) Aliases: @@ -237,37 +284,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -SourceResourceSettingResourceType -The resource type. -For example, the value can be Microsoft.Compute/virtualMachines. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourceResourceSettingTargetResourceName -Gets or sets the target Resource name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SubscriptionId The Subscription ID. @@ -321,12 +337,14 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource ## NOTES ALIASES +### Update-AzResourceMoverMoveResource + 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. @@ -336,5 +354,9 @@ DEPENDSONOVERRIDE : Gets or sets the move res - `[Id ]`: Gets or sets the ARM ID of the dependent resource. - `[TargetId ]`: Gets or sets the resource ARM id of either the MoveResource or the resource ARM ID of the dependent resource. +RESOURCESETTING : Gets or sets the resource settings. + - `ResourceType `: The resource type. For example, the value can be Microsoft.Compute/virtualMachines. + - `TargetResourceName `: Gets or sets the target Resource name. + ## RELATED LINKS diff --git a/src/ResourceMover/help/Az.ResourceMover.md b/src/ResourceMover/help/Az.ResourceMover.md index caf52d9d06ef..d222dcb850fd 100644 --- a/src/ResourceMover/help/Az.ResourceMover.md +++ b/src/ResourceMover/help/Az.ResourceMover.md @@ -20,9 +20,17 @@ Gets the move collection. ### [Get-AzResourceMoverMoveResource](Get-AzResourceMoverMoveResource.md) Gets the Move Resource. +### [Get-AzResourceMoverRequiredForResources](Get-AzResourceMoverRequiredForResources.md) +List of the move resources for which an arm resource is required for. + ### [Get-AzResourceMoverUnresolvedDependency](Get-AzResourceMoverUnresolvedDependency.md) Gets a list of unresolved dependencies. +### [Invoke-AzResourceMoverBulkRemove](Invoke-AzResourceMoverBulkRemove.md) +Removes the set of move resources included in the request body from move collection. +The orchestration is done by service. +To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. + ### [Invoke-AzResourceMoverCommit](Invoke-AzResourceMoverCommit.md) Commits the set of resources included in the request body. The commit operation is triggered on the moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful completion the moveResource moveState do a transition to Committed. diff --git a/src/ResourceMover/help/Get-AzResourceMoverMoveCollection.md b/src/ResourceMover/help/Get-AzResourceMoverMoveCollection.md index 60def5790cbd..392a8784a266 100644 --- a/src/ResourceMover/help/Get-AzResourceMoverMoveCollection.md +++ b/src/ResourceMover/help/Get-AzResourceMoverMoveCollection.md @@ -37,13 +37,13 @@ Gets the move collection. ### Example 1: Get details of all the Move collections in the subscription ```powershell -PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId e80eb9fa-c996-4435-aa32-5af6f3d3077c +PS C:\>Get-AzResourceMoverMoveCollection -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Location Name Type --------- ---- ---- -eastus2 mvcolle2e07001 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e34745 Microsoft.Migrate/moveCollections -eastus2 mvcolle2e56720 Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"270119e0-0000-0c00-0000-5f5c94940000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"39015ed4-0000-0c00-0000-5f5ce2760000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections +"1000b505-0000-0c00-0000-5f69db6e0000" centraluseuap MoveCollection-cus-eus-ccy Microsoft.Migrate/moveCollections ``` @@ -52,11 +52,11 @@ Get details of all the Move collections in the subscription. ### Example 2: Get details of the Move collection with a specified move collection name in the subscription ```powershell -PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM -Name PS-centralus-westcentralus-demoRM +PS C:\>Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PS-centralus-westcentralus-demoRMS" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections ``` @@ -64,13 +64,15 @@ Get details of the Move collection with a specified move collection name in the ### Example 3: Get details of the Move collection with a specified resource group name in the subscription ```powershell -PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName RG-MoveCollection-demoRM +PS C:\> Get-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" Location Name Type -------- ---- ---- eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections -eastus2euap PS-centralus-westcentralus-demoRM2 Microsoft.Migrate/moveCollections - +Etag Location Name Type +---- -------- ---- ---- +"22006609-0000-3300-0000-602169590000" centraluseuap PS-centralus-westcentralus-demoRMS Microsoft.Migrate/moveCollections +"4e02b0a9-0000-0c00-0000-5fd101cc0000" centraluseuap PS-centralus-westcentralus-demo2RMS Microsoft.Migrate/moveCollections ``` @@ -145,7 +147,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection ## NOTES diff --git a/src/ResourceMover/help/Get-AzResourceMoverMoveResource.md b/src/ResourceMover/help/Get-AzResourceMoverMoveResource.md index 68dc87d06ba1..0055f6610ef0 100644 --- a/src/ResourceMover/help/Get-AzResourceMoverMoveResource.md +++ b/src/ResourceMover/help/Get-AzResourceMoverMoveResource.md @@ -31,96 +31,138 @@ Gets the Move Resource. ### Example 1: Get details of all the resources in the Move collection. ```powershell -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM - -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : - -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.networ - k/publicipaddresses/psdemovm-ip, /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psd - emorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet, /subscriptions/e80eb9fa-c996-4435-aa32 - -5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemovm62 -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : MovePending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemovm62 -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Network/networkInterfaces -ResourceSettingTargetResourceName : psdemovm62 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network - /networkInterfaces/psdemovm62 -SourceResourceSettingResourceType : Microsoft.Network/networkInterfaces -SourceResourceSettingTargetResourceName : psdemovm62 -Target : -TargetId : -Type : - -Code : -DependsOn : {} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/psdemorm -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : CommitPending -MoveStatusTarget : -MoveStatusTargetId : -Name : psdemorm -ProvisioningState : Succeeded -ResourceSettingResourceType : resourceGroups -ResourceSettingTargetResourceName : psdemorm2 -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm -SourceResourceSettingResourceType : resourceGroups -SourceResourceSettingTargetResourceName : psdemorm -Target : -TargetId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/psdemorm2 -Type : +PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm-vnet +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemorm-vnet +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-v + net +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualNetworkResourceSettings +TargetId : +Type : + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm-nsg +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm-nsg +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psde + movm-nsg +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkSecurityGroupResourceSettings +TargetId : +Type : + +DependsOn : {} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemorm +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : DeleteSourcePending +Name : psdemorm +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings +TargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target +Type : ``` @@ -128,37 +170,33 @@ Get details of all the resources in the move collection. ### Example 2: Get details of a specific resources in a Move collection using move resource name . ```powershell -PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Name PSDemoVM +PS C:\> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov + m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : PSDemoVM +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings +TargetId : +Type : ``` @@ -166,37 +204,36 @@ Get details of a specific resources in a Move collection using move resource nam ### Example 3:Get details of a specific resources in a Move collection using filters such as : SourceResourceName, SourceId, MoveState, IsResolveRequired, ProvisioningState ```powershell -PS C:\>Get-AzResourceMoverMoveResource -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Filter "Properties/SourceResourceName eq 'PSDemoVM'" - -Code : -DependsOn : {/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Networ - k/networkInterfaces/psdemovm62, - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/PSDemoRM} -DependsOnOverride : {} -Detail : -ExistingTargetId : -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/M - icrosoft.Migrate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM -Message : -MoveStatusCode : -MoveStatusDetail : -MoveStatusJobName : -MoveStatusJobProgress : -MoveStatusMessage : -MoveStatusMoveState : PreparePending -MoveStatusTarget : -MoveStatusTargetId : -Name : PSDemoVM -ProvisioningState : Succeeded -ResourceSettingResourceType : Microsoft.Compute/virtualMachines -ResourceSettingTargetResourceName : PSDemoVM -SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute - /virtualMachines/PSDemoVM -SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines -SourceResourceSettingTargetResourceName : PSDemoVM -Target : -TargetId : -Type : +PS C:\WINDOWS\system32> Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Filter "Properties/SourceResourceName eq 'psdemovm111'" + + +DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm- + vnet, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroup + s/psdemovm-nsg, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm} +DependsOnOverride : {} +ErrorsPropertiesCode : +ErrorsPropertiesDetail : +ErrorsPropertiesMessage : +ErrorsPropertiesTarget : +ExistingTargetId : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveColle + ctions/PS-centralus-westcentralus-demoRMS1/moveResources/psdemovm111 +IsResolveRequired : False +JobStatusJobName : +JobStatusJobProgress : +MoveStatusErrorsPropertiesCode : +MoveStatusErrorsPropertiesDetail : +MoveStatusErrorsPropertiesMessage : +MoveStatusErrorsPropertiesTarget : +MoveStatusMoveState : PreparePending +Name : psdemovm111 +ProvisioningState : Succeeded +ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm + 111 +SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.NetworkInterfaceResourceSettings +TargetId : +Type : ``` @@ -302,7 +339,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveResource +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveResource ## NOTES diff --git a/src/ResourceMover/help/Get-AzResourceMoverRequiredForResources.md b/src/ResourceMover/help/Get-AzResourceMoverRequiredForResources.md new file mode 100644 index 000000000000..e2260ec430b3 --- /dev/null +++ b/src/ResourceMover/help/Get-AzResourceMoverRequiredForResources.md @@ -0,0 +1,128 @@ +--- +external help file: +Module Name: Az.ResourceMover +online version: https://docs.microsoft.com/powershell/module/az.resourcemover/get-azresourcemoverrequiredforresources +schema: 2.0.0 +--- + +# Get-AzResourceMoverRequiredForResources + +## SYNOPSIS +List of the move resources for which an arm resource is required for. + +## SYNTAX + +``` +Get-AzResourceMoverRequiredForResources -MoveCollectionName -ResourceGroupName + -SourceId [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +List of the move resources for which an arm resource is required for. + +## EXAMPLES + +### Example 1: Get a list of required resource ARMIDs that are required to be added, to add the specified resource. +```powershell +PS C:\> Get-AzResourceMoverRequiredForResources -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups" + +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg +``` + +Get a list of required resource ARMIDs that are required to be added, to add the specified resource. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MoveCollectionName +The Move Collection Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The Resource Group Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SourceId +The sourceId for which the api is invoked. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### System.String + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ResourceMover/help/Get-AzResourceMoverUnresolvedDependency.md b/src/ResourceMover/help/Get-AzResourceMoverUnresolvedDependency.md index cb90f740f765..8b739549a4a2 100644 --- a/src/ResourceMover/help/Get-AzResourceMoverUnresolvedDependency.md +++ b/src/ResourceMover/help/Get-AzResourceMoverUnresolvedDependency.md @@ -14,7 +14,8 @@ Gets a list of unresolved dependencies. ``` Get-AzResourceMoverUnresolvedDependency -MoveCollectionName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DependencyLevel ] [-Filter ] [-Orderby ] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -22,17 +23,18 @@ Gets a list of unresolved dependencies. ## EXAMPLES -### Example 1: Get list of unresolved dependent resources +### Example 1: Get list of unresolved dependent resources for a Move Collection. ```powershell -PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -Count Id ------ -- -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/publicipaddresses/psdemovm-ip -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/virtualnetworks/psdemorm-vnet -1 /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg +PS C:\> Get-AzResourceMoverUnresolvedDependency -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -DependencyLevel Descendant +Count Id +----- -- + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet + 1 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + 3 /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm ``` -Get list of unresolved dependent resources for a Move collection. +Get a list of unresolved dependent resources for a Move Collection. ## PARAMETERS @@ -51,6 +53,37 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DependencyLevel +Defines the dependency level. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.DependencyLevel +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +The filter to apply on the operation. +For example, $apply=filter(count eq 2). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -MoveCollectionName The Move Collection Name. @@ -66,6 +99,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Orderby +OData order by query option. +For example, you can use $orderby=Count desc. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The Resource Group Name. @@ -103,7 +152,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IUnresolvedDependencyCollection +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IUnresolvedDependency ## NOTES diff --git a/src/ResourceMover/help/Invoke-AzResourceMoverBulkRemove.md b/src/ResourceMover/help/Invoke-AzResourceMoverBulkRemove.md new file mode 100644 index 000000000000..867d7f0c9eb9 --- /dev/null +++ b/src/ResourceMover/help/Invoke-AzResourceMoverBulkRemove.md @@ -0,0 +1,270 @@ +--- +external help file: +Module Name: Az.ResourceMover +online version: https://docs.microsoft.com/powershell/module/az.resourcemover/invoke-azresourcemoverbulkremove +schema: 2.0.0 +--- + +# Invoke-AzResourceMoverBulkRemove + +## SYNOPSIS +Removes the set of move resources included in the request body from move collection. +The orchestration is done by service. +To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. + +## SYNTAX + +``` +Invoke-AzResourceMoverBulkRemove -MoveCollectionName -ResourceGroupName + [-SubscriptionId ] [-MoveResource ] [-MoveResourceInputType ] + [-ValidateOnly] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Removes the set of move resources included in the request body from move collection. +The orchestration is done by service. +To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true. + +## EXAMPLES + +### Example 1: Validate the dependecies before remove of the Move Resources from Move Collection +```powershell +PS C:\> Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:52:28 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Message : +Name : b4e3f140-b36b-4fd5-a507-b1e663ecf7a3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:52:28 PM +Status : Succeeded + +``` + +Validate the dependecies before remove of the move resources from Move Collection. + +### Example 2: Remove the Move Resource from Move Collection using "MoveResource Name" as input +```powershell +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:58:10 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d4827071-b797-45c5-b88c-00ddd7818d42 +Message : +Name : d4827071-b797-45c5-b88c-00ddd7818d42 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:57:08 PM +Status : Succeeded +``` + +Remove the Move Resource from Move Collection using "MoveResource Name" as input + +### Example 3: Remove the Move Resource from Move Collection using "SourceARMID" as input +```powershell +Invoke-AzResourceMoverBulkRemove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:05:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/7b6904e2-fc3f-400d-b248-8908fcb282fb +Message : +Name : 7b6904e2-fc3f-400d-b248-8908fcb282fb +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:05:00 PM +Status : Succeeded +``` + +Remove the Move Resource from Move Collection using "SourceARMID" as input + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MoveCollectionName +. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MoveResource +Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MoveResourceInputType +Defines the move resource input type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.MoveResourceInputType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ValidateOnly +Gets or sets a value indicating whether the operation needs to only run pre-requisite. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/ResourceMover/help/Invoke-AzResourceMoverCommit.md b/src/ResourceMover/help/Invoke-AzResourceMoverCommit.md index 77946e69e94b..e298aad063b8 100644 --- a/src/ResourceMover/help/Invoke-AzResourceMoverCommit.md +++ b/src/ResourceMover/help/Invoke-AzResourceMoverCommit.md @@ -27,68 +27,67 @@ To aid the user to prerequisite the operation the client can call operation with ## EXAMPLES -### Example 1: Validate the dependecies before commit of the resources +### Example 1: Validate the dependecies before commit of the resources. ```powershell -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') -ValidateOnly - - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:38:26 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/c194298b-b2eb-4aab-80b4-129d1473b75c +Message : +Name : c194298b-b2eb-4aab-80b4-129d1473b75c +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:38:25 PM Status : Succeeded ``` Validate the dependecies before commit of the resources. -### Example 2: Commit the set of resources in the Move Collection using "MoveResource Name" as input +### Example 2: Commit the set of resources in the Move Collection using "MoveResource Name" as input. ```powershell -PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('psdemorm') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:17:00 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Message : -Name : 5524d3f4-dd47-4572-9d8d-c62d3b513ee0 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:16:59 AM +PS C:\>Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:41:13 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/80c04850-7f3f-4e9c-aa68-b868978b59f3 +Message : +Name : 80c04850-7f3f-4e9c-aa68-b868978b59f3 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:41:05 PM Status : Succeeded ``` -Commit the set of resources in the Move Collection using "MoveResource Name" as input +Commit the set of resources in the Move Collection using "MoveResource Name" as input. -### Example 3: Commit the set of resources in the Move Collection using "SourceARMID" as input +### Example 3: Commit the set of resources in the Move Collection using "SourceARMID" as input. ```powershell -PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:19:29 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Message : -Name : aa9e2c4d-2160-4e36-b6fa-7465a3829ae9 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:19:28 AM +PS C:\> Invoke-AzResourceMoverCommit -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:42:46 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/d36ca519-8ced-48c9-a968-cb5e9c4db731 +Message : +Name : d36ca519-8ced-48c9-a968-cb5e9c4db731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:42:41 PM Status : Succeeded ``` -Commit the set of resources in the Move Collection using "SourceARMID" as input +Commit the set of resources in the Move Collection using "SourceARMID" as input. ## PARAMETERS @@ -265,7 +264,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ## NOTES diff --git a/src/ResourceMover/help/Invoke-AzResourceMoverDiscard.md b/src/ResourceMover/help/Invoke-AzResourceMoverDiscard.md index af0709b35d18..a96ee0c3e005 100644 --- a/src/ResourceMover/help/Invoke-AzResourceMoverDiscard.md +++ b/src/ResourceMover/help/Invoke-AzResourceMoverDiscard.md @@ -29,58 +29,58 @@ To aid the user to prerequisite the operation the client can call operation with ### Example 1: Validate the dependecies before Discard of the resources. ```powershell -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 9:44:54 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/62861ceb-28c9-4e0c-811b-84692a203181 -Message : -Name : 62861ceb-28c9-4e0c-811b-84692a203181 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 9:44:54 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:39:48 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:39:37 PM Status : Succeeded ``` Validate the dependecies before Discard of the resources. -### Example 2: Discards the move of the resources using "MoveResource Name" as input +### Example 2: Discards the move of the resources using "MoveResource Name" as input. ```powershell -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:26:51 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Message : -Name : 21f99cd3-89a4-4fcb-8b96-40d0572a6377 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:26:39 AM +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:56:33 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:55:21 PM Status : Succeeded ``` Discards the move of the resources using "MoveResource Name" as input. -### Example 3: Discards the move of the resources using "SourceARMID" as input +### Example 3: Discards the move of the resources using "SourceARMID" as input. ```powershell -PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:33:37 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/b842efcd-e5fd-42b0-a277-01ee8225deed -Message : -Name : b842efcd-e5fd-42b0-a277-01ee8225deed -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:33:23 AM +PS C:\> Invoke-AzResourceMoverDiscard -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:01:32 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:00:00 PM Status : Succeeded @@ -263,7 +263,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ## NOTES diff --git a/src/ResourceMover/help/Invoke-AzResourceMoverInitiateMove.md b/src/ResourceMover/help/Invoke-AzResourceMoverInitiateMove.md index 3f50ac2aa31e..83177b729caa 100644 --- a/src/ResourceMover/help/Invoke-AzResourceMoverInitiateMove.md +++ b/src/ResourceMover/help/Invoke-AzResourceMoverInitiateMove.md @@ -29,59 +29,59 @@ To aid the user to prerequisite the operation the client can call operation with ### Example 1: Validate the dependecies before Initiate Move for the resources. ```powershell -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') -ValidateOnly - - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 6:07:36 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Message : -Name : 8d6fbc01-9e5f-4a62-9bd7-03c18bd770f2 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:07:35 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" -ValidateOnly + + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 9:39:37 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/095f3d5 + 1-ebd1-4c5b-9a65-d78ebe3ac345 +Message : +Name : 095f3d51-ebd1-4c5b-9a65-d78ebe3ac345 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 9:39:37 AM Status : Succeeded ``` Validate the dependecies before Initiate Move for the resources. -### Example 2: Initiate Move for the set of resources in the Move collection using "MoveResource Name" as input +### Example 2: Initiate Move for the set of resources in the Move collection using "MoveResource Name" as input. ```powershell -PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResource $('PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:24:21 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/bc30d933-c2b6-47c9-b583-240d375b5864 -Message : -Name : bc30d933-c2b6-47c9-b583-240d375b5864 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:24:21 AM +PS C:\>Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemorm-vnet') -MoveResourceInputType "MoveResourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 11:56:33 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Message : +Name : 290472e3-c8de-4c55-aba1-3a34a7a4ab38 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 11:55:21 AM Status : Succeeded ``` Initiate Move for the set of resources in the Move collection using "MoveResource Name" as input. -### Example 3: Initiate Move for the set of resources in the Move Collection using "SourceARMID" as input +### Example 3: Initiate Move for the set of resources in the Move Collection using "SourceARMID" as input. ```powershell -PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/21/2020 5:38:33 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/cbc0f921-de9b-45d5-91da-60e36b841b10 -Message : -Name : cbc0f921-de9b-45d5-91da-60e36b841b10 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:37:23 AM +PS C:\> Invoke-AzResourceMoverInitiateMove -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') -MoveResourceInputType "MoveResourceSourceId" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 12:01:35 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/955fd43c-10b6-481e-888b-d26d6ec42aea +Message : +Name : 955fd43c-10b6-481e-888b-d26d6ec42aea +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 12:00:21 PM Status : Succeeded ``` @@ -263,7 +263,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ## NOTES diff --git a/src/ResourceMover/help/Invoke-AzResourceMoverPrepare.md b/src/ResourceMover/help/Invoke-AzResourceMoverPrepare.md index ee56c38f2f01..0eba7ec1673d 100644 --- a/src/ResourceMover/help/Invoke-AzResourceMoverPrepare.md +++ b/src/ResourceMover/help/Invoke-AzResourceMoverPrepare.md @@ -27,62 +27,74 @@ To aid the user to prerequisite the operation the client can call operation with ## EXAMPLES -### Example 1: Validate the dependecies before prepare for the resources +### Example 1: Validate the dependecies before prepare of the resources. Get the required dependent resources that also need to be prepared. ```powershell -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm') -ValidateOnly +PS C:\> $resp = Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemovm') -ValidateOnly AdditionalInfo : {Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationErrorAdditionalInfo} Code : MoveCollectionMissingRequiredDependentResources Detail : {} -EndTime : 8/21/2020 6:04:15 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr - ate/MoveCollections/MoveCollection-cus-wcus-eus2/operations/12d055bd-ac52-427f-8b05-b4b21c4b51e8 +EndTime : 2/9/2021 9:04:15 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RegionMoveRG-centralus-westcentralus/providers/Microsoft.Migr + ate/MoveCollections/PS-centralus-westcentralus-demoRMS/12d055bd-ac52-427f-8b05-b4b21c4b51e8 Message : The operation has failed as required move resources are missing from the input. Possible Causes: Dependent resources are missing from the input. Recommended Action: Retry the operation with all required resources, if the issue persist contact support. Name : 12d055bd-ac52-427f-8b05-b4b21c4b51e8 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 6:04:14 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 9:04:14 AM Status : Failed +PS C:> $resp.Code +MoveCollectionMissingRequiredDependentResources + +PS C:> $resp.AdditionalInfo[0].InfoMoveResource + +SourceId +-------- +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networkinterfaces/psdemovm111 +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/psdemorm/providers/Microsoft.Network/virtualNetworks/psdemorm-vnet +/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm/providers/microsoft.network/networksecuritygroups/psdemovm-nsg + ``` -Validate the dependecies before prepare for the resources. +Validate the dependecies before prepare of the resources. +Get the required dependent resources that also need to be prepared. -### Example 2: Initiate prepare for the set of resources in the Move Collection using "MoveResource Name" as input +### Example 2: Initiate prepare for the set of resources in the Move Collection using "MoveResource Name" as input. ```powershell -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -MoveResource $('psdemovm','psdemovm62', 'PSDemoVM-ip', 'PSDemoRM-vnet','PSDemoVM-nsg') - -AdditionalInfo : -Code : -Detail : -EndTime : 8/19/2020 6:18:09 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Message : -Name : da65e9c7-7fb9-44ef-af99-6f65b21e9951 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/19/2020 6:18:08 AM +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('PSDemoVM','psdemovm111', 'PSDemoRM-vnet','PSDemoVM-nsg') + +AAdditionalInfo : +Code : +Detail : +EndTime : 2/9/2021 11:25:13 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/49e4429 + 4-24ac-4eac-93da-e7e1c815554d +Message : +Name : 49e44294-24ac-4eac-93da-e7e1c815554d +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 10:55:53 AM Status : Succeeded ``` Initiate prepare for the set of resources in the Move Collection using "MoveResource Name" as input. -### Example 3: Initiate prepare for the set of resources in the Move Collection using "SourceARMID" +### Example 3: Initiate prepare for the set of resources in the Move Collection using "SourceARMID". ```powershell -PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') +PS C:\> Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResourceInputType MoveResourceSourceId -MoveResource $('/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRMS/providers/Microsoft.Network/networkSecurityGroups/PSDemoVM-nsg') AdditionalInfo : Code : Detail : -EndTime : 8/21/2020 5:35:30 AM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 +EndTime : 2/9/2021 11:09:30 AM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/MoveColl + ections/PS-centralus-westcentralus-demoRMS/operations/c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 Message : Name : c7b13d43-a6fe-48e3-bb8c-3ad9e6ba3355 -Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/21/2020 5:35:27 AM +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 11:05:27 AM Status : Succeeded ``` @@ -264,7 +276,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ## NOTES diff --git a/src/ResourceMover/help/New-AzResourceMoverMoveCollection.md b/src/ResourceMover/help/New-AzResourceMoverMoveCollection.md index f5275e9c0ee7..50fb79425cb0 100644 --- a/src/ResourceMover/help/New-AzResourceMoverMoveCollection.md +++ b/src/ResourceMover/help/New-AzResourceMoverMoveCollection.md @@ -26,14 +26,14 @@ Creates or updates a move collection. ### Example 1: Create a new Move collection. ```powershell -PS C:\> New-AzResourceMoverMoveCollection -Name PS-centralus-westcentralus-demoRM -ResourceGroupName RG-MoveCollection-demoRM -SourceRegion centralus -TargetRegion westcentralus -Location eastus2 +PS C:\> New-AzResourceMoverMoveCollection -Name "PS-centralus-westcentralus-demoRMS" -ResourceGroupName "RG-MoveCollection-demoRMS" -SourceRegion "centralus" -TargetRegion "westcentralus" -Location "centraluseuap" -IdentityType "SystemAssigned" -Location Name Type --------- ---- ---- -eastus2 PS-centralus-westcentralus-demoRM Microsoft.Migrate/moveCollections +Etag Location Name Type +---- -------- ---- ---- +"0200d92f-0000-3300-0000-6021e9ec0000" centraluseuap PS-centralus-westcentralus-demoRMs Microsoft.Migrate/moveCollections ``` -Create a new Move collection within a subscription. +Create a new Move Collection. ## PARAMETERS @@ -83,7 +83,7 @@ Accept wildcard characters: False ``` ### -IdentityType -The type of identity used for the region move service. +The type of identity used for the resource mover service. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Support.ResourceIdentityType @@ -240,7 +240,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IMoveCollection +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IMoveCollection ## NOTES diff --git a/src/ResourceMover/help/Remove-AzResourceMoverMoveCollection.md b/src/ResourceMover/help/Remove-AzResourceMoverMoveCollection.md index 4cb43b42c9f9..2b64a1844ef2 100644 --- a/src/ResourceMover/help/Remove-AzResourceMoverMoveCollection.md +++ b/src/ResourceMover/help/Remove-AzResourceMoverMoveCollection.md @@ -22,24 +22,24 @@ Deletes a move collection. ## EXAMPLES -### Example 1: Remove the Move Collection from the specified subscription +### Example 1: Remove the Move Collection. ```powershell -PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" - - AdditionalInfo : - Code : - Detail : - EndTime : 8/12/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866d6 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/12/2020 3:27:27 PM - Status : Succeeded +PS C:\> Remove-AzResourceMoverMoveCollection -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" + +AdditionalInfo : +Code : +Detail : +EndTime : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/ec788761-2f1b-46a2-97b7-f5056afd334d +Message : +Name : +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : +Status : Succeeded ``` -Remove the Move collection from the specified subscription. +Remove the Move Collection. ## PARAMETERS @@ -186,7 +186,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ## NOTES diff --git a/src/ResourceMover/help/Remove-AzResourceMoverMoveResource.md b/src/ResourceMover/help/Remove-AzResourceMoverMoveResource.md index cdcff02a62ff..a90c5e34db0d 100644 --- a/src/ResourceMover/help/Remove-AzResourceMoverMoveResource.md +++ b/src/ResourceMover/help/Remove-AzResourceMoverMoveResource.md @@ -23,25 +23,25 @@ Deletes a Move Resource from the move collection. ## EXAMPLES -### Example 1: Remove the resource from the Move collection +### Example 1: Remove one Move Rresource from the Move Collection. ```powershell -PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName PS-centralus-westcentralus-demoRM -Name "psdemorm" - - AdditionalInfo : - Code : - Detail : - EndTime : 8/11/2020 3:27:28 PM - Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveColl - ections/PS-centralus-westcentralus-demoRM/operations/3c2aae83-0a05-432c-be8e-a156351866c5 - Message : - Name : 3c2aae83-0a05-432c-be8e-a156351866c5 - Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties - StartTime : 8/11/2020 3:27:27 PM - Status : Succeeded +PS C:\> Remove-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -Name "psdemorm-vnet" + +AdditionalInfo : +Code : +Detail : +EndTime : 2/10/2021 1:08:49 PM +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralu + s-demoRMS/operations/bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Message : +Name : bee69758-c7cb-4160-b3e0-8e4b69ec3731 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/10/2021 1:08:47 PM +Status : Succeeded ``` -Remove the resource from the Move collection within the specified subscription. +Remove one Move Rresource from the Move Collection. ## PARAMETERS @@ -203,7 +203,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ## NOTES diff --git a/src/ResourceMover/help/Resolve-AzResourceMoverMoveCollectionDependency.md b/src/ResourceMover/help/Resolve-AzResourceMoverMoveCollectionDependency.md index 47e38a36191d..2b3f791b21be 100644 --- a/src/ResourceMover/help/Resolve-AzResourceMoverMoveCollectionDependency.md +++ b/src/ResourceMover/help/Resolve-AzResourceMoverMoveCollectionDependency.md @@ -23,27 +23,27 @@ Computes, resolves and validate the dependencies of the moveResources in the mov ## EXAMPLES -### Example 1: Computes, resolves and validate the dependencies of the moveresources in the Move collection. +### Example 1: Compute, resolve and validate the dependencies of the Move Resources in the Move collection. ```powershell -PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRM" -MoveCollectionName "PS-centralus-westcentralus-demoRM" +PS C:\> Resolve-AzResourceMoverMoveCollectionDependency -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" AdditionalInfo : Code : MoveCollectionResolveDependenciesOperationFailed Detail : {} -EndTime : 8/16/2020 2:28:18 PM -Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migrate/MoveCollections/PS-ce - ntralus-westcentralus-demoRM/operations/bce85a10-1ff3-4815-a677-7b188f7b441a -Message : The resolve dependencies operation of one ore more resources has failed. Check the move status of the resource for more details. -Possible Causes: The resolve dependencies operation of one ore more resources has failed. -Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. +EndTime : 2/9/2021 2:05:04 AM +Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/operations/c2ad006 + 6-6a69-45fe-aa70-193c240a9bc0 +Message : The resolve dependencies operation of one or more resources has failed. Check the move status of the resource for more details. + Possible Causes: The resolve dependencies operation of one ore more resources has failed. + Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support. -Name : bce85a10-1ff3-4815-a677-7b188f7b441a -Property : Microsoft.Azure.PowerShell.Cmdlets.RegionMove.Models.Api20191001Preview.OperationStatusProperties -StartTime : 8/16/2020 2:28:16 PM +Name : c2ad0066-6a69-45fe-aa70-193c240a9bc0 +Property : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Any +StartTime : 2/9/2021 2:05:00 AM Status : Succeeded ``` -Computes, resolves and validate the dependencies of the moveresources in the Move collection. +Compute, resolve and validate the dependencies of the Move Resources in the Move collection. ## PARAMETERS @@ -175,7 +175,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api20191001Preview.IOperationStatus +### Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.IOperationStatus ## NOTES diff --git a/src/ResourceMover/readme.md b/src/ResourceMover/readme.md index c198669be544..9e2b81e24add 100644 --- a/src/ResourceMover/readme.md +++ b/src/ResourceMover/readme.md @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the ResourceMover service. This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. ## Module Requirements -- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 1.8.1 or greater +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater ## Authentication AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. @@ -60,15 +60,15 @@ module-name: $(prefix).$(service-name) namespace: Microsoft.Azure.PowerShell.Cmdlets.$(service-name) clear-output-folder: true output-folder: . -aks: $(repo)/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview +aks: $(repo)/specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-01-01 input-file: - - $(aks)/regionmovecollection.json + - $(aks)/resourcemovercollection.json module-version: 0.1.0 directive: # Remove the unexpanded parameter set - where: - variant: ^Initiate$|^InitiateViaIdentity$|^InitiateViaIdentityExpanded$|^Commit$|^CommitViaIdentity$|^CommitViaIdentityExpanded$|^Discard$|^DiscardViaIdentity$|^DiscardViaIdentityExpanded$|^Prepare$|^PrepareViaIdentity$|^PrepareViaIdentityExpanded$|^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateExpanded$|^UpdateViaIdentityExpanded$|^UpdateViaIdentity$|^ResolveViaIdentity$|^GetViaIdentity$|^DeleteViaIdentity$ + variant: ^Initiate$|^InitiateViaIdentity$|^InitiateViaIdentityExpanded$|^Commit$|^CommitViaIdentity$|^CommitViaIdentityExpanded$|^Discard$|^DiscardViaIdentity$|^DiscardViaIdentityExpanded$|^Prepare$|^PrepareViaIdentity$|^PrepareViaIdentityExpanded$|^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateExpanded$|^UpdateViaIdentityExpanded$|^UpdateViaIdentity$|^ResolveViaIdentity$|^GetViaIdentity$|^DeleteViaIdentity$|^Bulk$|^BulkViaIdentity$|^BulkViaIdentityExpanded$ remove: true - where: subject: OperationsDiscovery @@ -102,7 +102,22 @@ directive: - where: variant: CommitExpanded set: - subject: Commit + subject: Commit + - where: + variant: BulkExpanded + set: + subject: BulkRemove + - where: + verb: Add + subject: MoveResource + set: + alias: + - Update-AzResourceMoverMoveResource + - where: + verb: Get + subject: MoveCollectionRequired + set: + subject: RequiredForResources - where: model-name: MoveResource set: @@ -115,4 +130,9 @@ directive: model-name: UnresolvedDependency set: suppress-format: true + - no-inline: + - ResourceSettings + - from: source-file-csharp + where: $ + transform: $ = $.replace(/error = true;/g, '//error = true;'); ``` diff --git a/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Recording.json b/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Recording.json index 1b6cfff6ec18..44f888c1e3da 100644 --- a/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Recording.json +++ b/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Recording.json @@ -1,12 +1,13 @@ { - "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$DELETE+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview+1": { + "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$DELETE+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "35e89286-5697-4335-a11a-90fc262320db" ], + "x-ms-client-request-id": [ "f00f97c6-fb49-457d-9cc6-f064e3390689" ], "CommandName": [ "Remove-AzResourceMoverMoveResource" ], "FullCommandName": [ "Remove-AzResourceMoverMoveResource_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -17,113 +18,37 @@ } }, "Response": { - "StatusCode": 202, + "StatusCode": 204, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Retry-After": [ "15" ], - "x-ms-request-id": [ "a1c5b54b-cd3b-48a0-9ea0-d19e655467ed" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4938da6a-06a8-43de-b23e-a62457417f20?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "54f0ab7d-b387-42a2-84ac-bc0fd14b1f23" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "41edf4e3-60cf-49f3-a452-0252c84df4bb" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102404Z:41edf4e3-60cf-49f3-a452-0252c84df4bb" ], - "Date": [ "Tue, 25 Aug 2020 10:24:03 GMT" ] + "x-ms-correlation-request-id": [ "5133babc-4651-4f7c-938b-96021a789f3f" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T045836Z:5133babc-4651-4f7c-938b-96021a789f3f" ], + "Date": [ "Sun, 31 Jan 2021 04:58:36 GMT" ] }, "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null - } - }, - "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4938da6a-06a8-43de-b23e-a62457417f20?api-version=2019-10-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4938da6a-06a8-43de-b23e-a62457417f20?api-version=2019-10-01-preview", - "Content": null, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "35e89286-5697-4335-a11a-90fc262320db" ], - "CommandName": [ "Remove-AzResourceMoverMoveResource" ], - "FullCommandName": [ "Remove-AzResourceMoverMoveResource_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "39503c9a-8fcc-48d5-9ba0-853751298339" ], - "X-Content-Type-Options": [ "nosniff" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "f3c020de-5a8d-4a91-aa64-a8e735cb0619" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102419Z:f3c020de-5a8d-4a91-aa64-a8e735cb0619" ], - "Date": [ "Tue, 25 Aug 2020 10:24:19 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "372" ], - "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4938da6a-06a8-43de-b23e-a62457417f20\",\"name\":\"4938da6a-06a8-43de-b23e-a62457417f20\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:24:03 AM\",\"endTime\":\"8/25/2020 10:24:04 AM\",\"error\":null,\"properties\":{}}" - } - }, - "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4938da6a-06a8-43de-b23e-a62457417f20?api-version=2019-10-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4938da6a-06a8-43de-b23e-a62457417f20?api-version=2019-10-01-preview", "Content": null, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "35e89286-5697-4335-a11a-90fc262320db" ], - "CommandName": [ "Remove-AzResourceMoverMoveResource" ], - "FullCommandName": [ "Remove-AzResourceMoverMoveResource_Delete" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2930ee71-ac1e-4142-8919-6986017f7f7f" ], - "X-Content-Type-Options": [ "nosniff" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "fe6b08d5-9806-455c-805d-c62e2a5a38f1" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102419Z:fe6b08d5-9806-455c-805d-c62e2a5a38f1" ], - "Date": [ "Tue, 25 Aug 2020 10:24:19 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "372" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4938da6a-06a8-43de-b23e-a62457417f20\",\"name\":\"4938da6a-06a8-43de-b23e-a62457417f20\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:24:03 AM\",\"endTime\":\"8/25/2020 10:24:04 AM\",\"error\":null,\"properties\":{}}" + "isContentBase64": false } }, - "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$PUT+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview+4": { + "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$PUT+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview", - "Content": "{\n \"properties\": {\n \"resourceSettings\": {\n \"resourceType\": \"resourceGroups\",\n \"targetResourceName\": \"my-tRgVm1\"\n },\n \"sourceId\": \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01", + "Content": "{\n \"properties\": {\n \"sourceId\": \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\",\n \"resourceSettings\": {\n \"resourceType\": \"ResourceGroups\",\n \"targetResourceName\": \"rms-sRg-westus2\"\n }\n }\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "233" ] + "Content-Length": [ "237" ] } }, "Response": { @@ -132,31 +57,34 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "87151c7f-3a02-4a52-883a-da70cec707a6" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/e1f5fcfb-a696-4b2b-99e3-d4284396de5d?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "fd063ece-8d02-4d08-8252-a8bb64eaf3d6" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/fc8beef8-e5b4-4dbd-b38b-5c7cd9dd7e48?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "993b9a6f-18a8-47b1-b048-5fd472a91baa" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102420Z:993b9a6f-18a8-47b1-b048-5fd472a91baa" ], - "Date": [ "Tue, 25 Aug 2020 10:24:20 GMT" ] + "x-ms-correlation-request-id": [ "18e172ce-5295-4f4c-8862-f41e3b436761" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T045837Z:18e172ce-5295-4f4c-8862-f41e3b436761" ], + "Date": [ "Sun, 31 Jan 2021 04:58:37 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/e1f5fcfb-a696-4b2b-99e3-d4284396de5d?api-version=2019-10-01-preview+5": { + "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/fc8beef8-e5b4-4dbd-b38b-5c7cd9dd7e48?api-version=2021-01-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/e1f5fcfb-a696-4b2b-99e3-d4284396de5d?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/fc8beef8-e5b4-4dbd-b38b-5c7cd9dd7e48?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "9b54c700-4f89-4256-91b6-302e1687f891" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "aee0438b-c62f-48d1-a29e-f4e4a66601aa" ], "CommandName": [ "Add-AzResourceMoverMoveResource" ], "FullCommandName": [ "Add-AzResourceMoverMoveResource_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -170,31 +98,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a9465d8d-d71f-4e11-b18d-d7aeebdc28a6" ], + "x-ms-request-id": [ "4245e64c-87df-4a03-8208-97a18ddb2a68" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "7eb658a3-7679-4571-822f-9756c4aa26e8" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102435Z:7eb658a3-7679-4571-822f-9756c4aa26e8" ], - "Date": [ "Tue, 25 Aug 2020 10:24:35 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "ff54830f-8c85-4180-a892-009e3c288fed" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T045853Z:ff54830f-8c85-4180-a892-009e3c288fed" ], + "Date": [ "Sun, 31 Jan 2021 04:58:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/e1f5fcfb-a696-4b2b-99e3-d4284396de5d\",\"name\":\"e1f5fcfb-a696-4b2b-99e3-d4284396de5d\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:24:20 AM\",\"endTime\":\"8/25/2020 10:24:21 AM\",\"error\":null,\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/fc8beef8-e5b4-4dbd-b38b-5c7cd9dd7e48\",\"name\":\"fc8beef8-e5b4-4dbd-b38b-5c7cd9dd7e48\",\"status\":\"Succeeded\",\"startTime\":\"1/31/2021 4:58:36 AM\",\"endTime\":\"1/31/2021 4:58:38 AM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview+6": { + "Add-AzResourceMoverMoveResource+[NoContext]+AddExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "9b54c700-4f89-4256-91b6-302e1687f891" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "aee0438b-c62f-48d1-a29e-f4e4a66601aa" ], "CommandName": [ "Add-AzResourceMoverMoveResource" ], "FullCommandName": [ "Add-AzResourceMoverMoveResource_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -208,20 +138,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3696a0cf-fe8c-4265-9b48-dd7ac1c6faf5" ], + "x-ms-request-id": [ "ca5a6f55-82ac-48b9-8e20-ea1590df13d7" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "2780ca75-a6d4-4bc8-8035-9a8a6261e60e" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102436Z:2780ca75-a6d4-4bc8-8035-9a8a6261e60e" ], - "Date": [ "Tue, 25 Aug 2020 10:24:35 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "f74a0506-bd6a-49c8-bad0-22933d4b3d8e" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T045853Z:f74a0506-bd6a-49c8-bad0-22933d4b3d8e" ], + "Date": [ "Sun, 31 Jan 2021 04:58:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1466" ], + "Content-Length": [ "1460" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"name\":\"my-sRgVm1\",\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/MoveResources/my-sRgVm1\",\"type\":null,\"properties\":{\"provisioningState\":\"Succeeded\",\"isResolveRequired\":\"False\",\"sourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\",\"targetId\":null,\"existingTargetId\":null,\"resourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"my-tRgVm1\"},\"moveStatus\":{\"moveState\":\"PreparePending\",\"jobStatus\":null,\"errors\":{\"properties\":{\"code\":\"DependencyComputationPending\",\"message\":\"The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\u0027.\\n Possible Causes: Dependency computation is pending for resource.\\n Recommended Action: Validate dependencies to compute the dependencies.\\n \",\"details\":[{\"code\":\"TargetResourceGroupNameAlreadyExists\",\"message\":\"A resource group with the same name /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1 already exists.\\n Possible Causes: A resource group with the same name exists.\\n Recommended Action: Retry the operation by providing a different target resource group name.\\n \",\"details\":null}]}}},\"dependsOn\":[],\"dependsOnOverrides\":[],\"errors\":null,\"sourceResourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"my-sRgVm1\"}}}" + "Content": "{\"name\":\"rms-sRg\",\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg\",\"type\":null,\"properties\":{\"provisioningState\":\"Succeeded\",\"isResolveRequired\":false,\"sourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\",\"targetId\":null,\"existingTargetId\":null,\"resourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"rms-sRg-westus2\"},\"moveStatus\":{\"moveState\":\"PreparePending\",\"jobStatus\":null,\"errors\":{\"properties\":{\"code\":\"DependencyComputationPending\",\"message\":\"The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\u0027.\\n Possible Causes: Dependency computation is pending for resource.\\n Recommended Action: Validate dependencies to compute the dependencies.\\n \",\"details\":[{\"code\":\"TargetResourceGroupNameAlreadyExists\",\"message\":\"A resource group with the same name /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg already exists.\\n Possible Causes: A resource group with the same name exists.\\n Recommended Action: Retry the operation by providing a different target resource group name.\\n \",\"details\":null}]}}},\"dependsOn\":[],\"dependsOnOverrides\":[],\"errors\":null,\"sourceResourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"rms-sRg\"}}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Tests.ps1 b/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Tests.ps1 index 2c99c3c5e15a..b88a288b5bd3 100644 --- a/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Tests.ps1 +++ b/src/ResourceMover/test/Add-AzResourceMoverMoveResource.Tests.ps1 @@ -12,9 +12,12 @@ while (-not $mockingPath) { . ($mockingPath | Select-Object -First 1).FullName Describe 'Add-AzResourceMoverMoveResource' { - It 'AddExpanded' { - Remove-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "my-sRgVm1" - $moveResource = Add-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1" -Name my-sRgVm1 -ResourceSettingResourceType resourceGroups -ResourceSettingTargetResourceName "my-tRgVm1" - $moveResource.Name | Should -Be "my-sRgVm1" + It 'AddExpanded' { + Remove-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -Name "rms-sRg" + $trs = New-Object Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceGroupResourceSettings + $trs.ResourceType = "ResourceGroups" + $trs.TargetResourceName = "rms-sRg-westus2" + $moveResource = Add-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg" -Name "rms-sRg" -ResourceSetting $trs + $moveResource.Name | Should -Be "rms-sRg" } } diff --git a/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Recording.json b/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Recording.json index b1fde1a8308c..00d0ec94a752 100644 --- a/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Recording.json +++ b/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Recording.json @@ -1,9 +1,10 @@ { - "Get-AzResourceMoverMoveCollection+[NoContext]+List+$GET+https://management.azure.com/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/providers/Microsoft.Migrate/moveCollections?api-version=2019-10-01-preview+1": { + "Get-AzResourceMoverMoveCollection+[NoContext]+List+$GET+https://management.azure.com/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/providers/Microsoft.Migrate/moveCollections?api-version=2021-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/providers/Microsoft.Migrate/moveCollections?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/providers/Microsoft.Migrate/moveCollections?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "7" ], "x-ms-client-request-id": [ "2a1c3929-6811-4d35-bdb3-c74e9a62888f" ], @@ -21,30 +22,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "ETag": [ "\"1c0011ff-0000-3400-0000-601554b20000\"" ], "x-ms-request-id": [ "f10a0acb-3292-455f-b3ac-1bac3e4dc8ff" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], "x-ms-correlation-request-id": [ "66188420-bc37-4619-9b1e-e256723e79d5" ], "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102437Z:66188420-bc37-4619-9b1e-e256723e79d5" ], - "Date": [ "Tue, 25 Aug 2020 10:24:36 GMT" ] + "Date": [ "Sun, 31 Jan 2021 10:24:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1003" ], + "Content-Length": [ "1286" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/resourceGroups/RG-MoveCollection-M8SwaggerValiation/providers/Microsoft.Migrate/moveCollections/PSMV-centralus-westcentralus-M8SwaggerValiation\",\"name\":\"PSMV-centralus-westcentralus-M8SwaggerValiation\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"ab009556-0000-0200-0000-5f3d5fdb0000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null}},{\"id\":\"/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/resourceGroups/RG-MoveCollection-M8SwaggerValiation/providers/Microsoft.Migrate/moveCollections/PSMV-centralus-westcentralus-M8SwaggerValiation2\",\"name\":\"PSMV-centralus-westcentralus-M8SwaggerValiation2\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"ab009756-0000-0200-0000-5f3d60810000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null}}]}" + "Content": "{\"value\":[{\"id\":\"/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/resourceGroups/RG-MoveCollection-M8SwaggerValiation/providers/Microsoft.Migrate/moveCollections/PSMV-centralus-westcentralus-M8SwaggerValiation\",\"name\":\"PSMV-centralus-westcentralus-M8SwaggerValiation\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"ab009556-0000-0200-0000-5f3d5fdb0000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null},\"identity\":{\"principalId\":\"5bfcb894-eafb-491d-a32d-527e1559d4b9\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"}},{\"id\":\"/subscriptions/d43336d5-9b49-4b53-a3e5-1b07465f4bd6/resourceGroups/RG-MoveCollection-M8SwaggerValiation/providers/Microsoft.Migrate/moveCollections/PSMV-centralus-westcentralus-M8SwaggerValiation2\",\"name\":\"PSMV-centralus-westcentralus-M8SwaggerValiation2\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"ab009756-0000-0200-0000-5f3d60810000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null},\"identity\":{\"principalId\":\"5bfcb895-eafc-401d-b86d-527e1559d4b9\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"}}]}", + "isContentBase64": false } }, - "Get-AzResourceMoverMoveCollection+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection?api-version=2019-10-01-preview+1": { + "Get-AzResourceMoverMoveCollection+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms?api-version=2021-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "30b0c503-9591-4816-b2dd-81e7d4c76030" ], + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "6d997749-be5b-4000-bb8c-b2803941e60b" ], "CommandName": [ "Get-AzResourceMoverMoveCollection" ], "FullCommandName": [ "Get-AzResourceMoverMoveCollection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -59,31 +63,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"600193a8-0000-0200-0000-5f44e44c0000\"" ], - "x-ms-request-id": [ "50771b8c-f14f-4b99-976c-b81ed1d66159" ], + "ETag": [ "\"1c0011ff-0000-3400-0000-601554b20000\"" ], + "x-ms-request-id": [ "2c5a9c1d-38ed-4b97-91ab-fbb6946f112b" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "4f22283d-d4ce-4122-849f-91c024202928" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102437Z:4f22283d-d4ce-4122-849f-91c024202928" ], - "Date": [ "Tue, 25 Aug 2020 10:24:37 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "90a05327-c6f4-4120-a727-d01ea967e6ca" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T053000Z:90a05327-c6f4-4120-a727-d01ea967e6ca" ], + "Date": [ "Sun, 31 Jan 2021 05:29:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "418" ], + "Content-Length": [ "556" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection\",\"name\":\"my-movecollection\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"600193a8-0000-0200-0000-5f44e44c0000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms\",\"name\":\"MoveCollection-rms\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"1c0011ff-0000-3400-0000-601554b20000\\\"\",\"location\":\"eastus2euap\",\"properties\":{\"sourceRegion\":\"westus\",\"targetRegion\":\"westus2\",\"provisioningState\":\"Succeeded\",\"errors\":null},\"identity\":{\"principalId\":\"5bfcb894-eafb-491d-a32d-527e1559d4b9\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"}}", + "isContentBase64": false } }, - "Get-AzResourceMoverMoveCollection+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections?api-version=2019-10-01-preview+1": { + "Get-AzResourceMoverMoveCollection+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections?api-version=2021-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "b7a57164-a938-436e-9a96-26ded2746eab" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "91d63eeb-c6e5-4066-9c36-355c634051a0" ], "CommandName": [ "Get-AzResourceMoverMoveCollection" ], "FullCommandName": [ "Get-AzResourceMoverMoveCollection_List1" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -98,20 +104,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8a63f9ec-9a23-414e-8824-ebb0a83fcc69" ], + "x-ms-request-id": [ "1c6c16f3-d7e0-4391-b726-f3e3d8fc5893" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "1f3e9ec6-2e4e-4cad-ad6f-34050b4d080b" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102437Z:1f3e9ec6-2e4e-4cad-ad6f-34050b4d080b" ], - "Date": [ "Tue, 25 Aug 2020 10:24:37 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "45fc6ef1-fbea-4939-b281-f814a640b78d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T053001Z:45fc6ef1-fbea-4939-b281-f814a640b78d" ], + "Date": [ "Sun, 31 Jan 2021 05:30:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "430" ], + "Content-Length": [ "568" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection\",\"name\":\"my-movecollection\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"600193a8-0000-0200-0000-5f44e44c0000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null}}]}" + "Content": "{\"value\":[{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms\",\"name\":\"MoveCollection-rms\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"1c0011ff-0000-3400-0000-601554b20000\\\"\",\"location\":\"eastus2euap\",\"properties\":{\"sourceRegion\":\"westus\",\"targetRegion\":\"westus2\",\"provisioningState\":\"Succeeded\",\"errors\":null},\"identity\":{\"principalId\":\"5bfcb894-eafb-491d-a32d-527e1559d4b9\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"}}]}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Tests.ps1 b/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Tests.ps1 index 58c18d9a533a..c700bfc85d64 100644 --- a/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Tests.ps1 +++ b/src/ResourceMover/test/Get-AzResourceMoverMoveCollection.Tests.ps1 @@ -15,7 +15,7 @@ Describe 'Get-AzResourceMoverMoveCollection' { It 'List' { $tempSubscriptionId = "d43336d5-9b49-4b53-a3e5-1b07465f4bd6" $moveCollection = Get-AzResourceMoverMoveCollection -SubscriptionId $tempSubscriptionId - $moveCollection.Length | Should -BeGreaterOrEqual 2 + $moveCollection.Count | Should -BeGreaterOrEqual 2 } It 'Get' { @@ -24,7 +24,7 @@ Describe 'Get-AzResourceMoverMoveCollection' { } It 'List1' { - $moveCollection = Get-AzResourceMoverMoveCollection -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG - $moveCollection.Length | Should -BeGreaterOrEqual 1 + $moveCollection = Get-AzResourceMoverMoveCollection -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG + $moveCollection.Count | Should -BeGreaterOrEqual 1 } } diff --git a/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Recording.json b/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Recording.json index f432e4324448..4e3f60df2e4e 100644 --- a/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Recording.json +++ b/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Recording.json @@ -1,12 +1,13 @@ { - "Get-AzResourceMoverMoveResource+[NoContext]+List+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources?api-version=2019-10-01-preview+1": { + "Get-AzResourceMoverMoveResource+[NoContext]+List+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources?api-version=2021-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "8985c067-2e54-4f36-bd32-b15a3151aae0" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "087b2c78-0b20-4fb7-ac47-2ce45a2207bd" ], "CommandName": [ "Get-AzResourceMoverMoveResource" ], "FullCommandName": [ "Get-AzResourceMoverMoveResource_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,30 +22,32 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ef88f9aa-bab0-4400-8044-e624a795573b" ], + "x-ms-request-id": [ "4b7b7646-c720-4b51-bd9c-09458db3734a" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "5106cf0e-0852-4c11-ac97-114d297eeefc" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102438Z:5106cf0e-0852-4c11-ac97-114d297eeefc" ], - "Date": [ "Tue, 25 Aug 2020 10:24:38 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "583743bc-a986-4448-8a31-d2ba33166322" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T053002Z:583743bc-a986-4448-8a31-d2ba33166322" ], + "Date": [ "Sun, 31 Jan 2021 05:30:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1509" ], + "Content-Length": [ "1528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"name\":\"my-sRgVm1\",\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/MoveResources/my-sRgVm1\",\"type\":null,\"properties\":{\"provisioningState\":\"Succeeded\",\"isResolveRequired\":\"False\",\"sourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\",\"targetId\":null,\"existingTargetId\":null,\"resourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"my-tRgVm1\"},\"moveStatus\":{\"moveState\":\"PreparePending\",\"jobStatus\":null,\"errors\":{\"properties\":{\"code\":\"DependencyComputationPending\",\"message\":\"The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\u0027.\\n Possible Causes: Dependency computation is pending for resource.\\n Recommended Action: Validate dependencies to compute the dependencies.\\n \",\"details\":[{\"code\":\"TargetResourceGroupNameAlreadyExists\",\"message\":\"A resource group with the same name /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1 already exists.\\n Possible Causes: A resource group with the same name exists.\\n Recommended Action: Retry the operation by providing a different target resource group name.\\n \",\"details\":null}]}}},\"dependsOn\":[],\"dependsOnOverrides\":[],\"errors\":null,\"sourceResourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"my-sRgVm1\"}}}],\"nextLink\":null,\"totalCount\":1}" + "Content": "{\"value\":[{\"name\":\"rms-sRg\",\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg\",\"type\":null,\"properties\":{\"provisioningState\":\"Succeeded\",\"isResolveRequired\":false,\"sourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\",\"targetId\":null,\"existingTargetId\":null,\"resourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"rms-sRg-westus2\"},\"moveStatus\":{\"moveState\":\"PreparePending\",\"jobStatus\":null,\"errors\":{\"properties\":{\"code\":\"DependencyComputationPending\",\"message\":\"The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\u0027.\\n Possible Causes: Dependency computation is pending for resource.\\n Recommended Action: Validate dependencies to compute the dependencies.\\n \",\"details\":[{\"code\":\"TargetResourceGroupNameAlreadyExists\",\"message\":\"A resource group with the same name /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg already exists.\\n Possible Causes: A resource group with the same name exists.\\n Recommended Action: Retry the operation by providing a different target resource group name.\\n \",\"details\":null}]}}},\"dependsOn\":[],\"dependsOnOverrides\":[],\"errors\":null,\"sourceResourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"rms-sRg\"}}}],\"nextLink\":null,\"totalCount\":1,\"summaryCollection\":null}", + "isContentBase64": false } }, - "Get-AzResourceMoverMoveResource+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview+1": { + "Get-AzResourceMoverMoveResource+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "4ffddb8c-ec07-4633-befc-27313c3b3b8a" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "fa4840eb-70a3-4b85-a115-7d844e2b3e8f" ], "CommandName": [ "Get-AzResourceMoverMoveResource" ], "FullCommandName": [ "Get-AzResourceMoverMoveResource_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -59,20 +62,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "37d5c30b-559c-4090-9ef9-43613f7e8091" ], + "x-ms-request-id": [ "3daa99c2-ef1b-4a85-a6ee-cfe13e4a0676" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "x-ms-correlation-request-id": [ "9e69f3b0-1b86-468d-b7b4-73373ddaec4b" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102438Z:9e69f3b0-1b86-468d-b7b4-73373ddaec4b" ], - "Date": [ "Tue, 25 Aug 2020 10:24:38 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "6681fd1d-b95f-405f-a890-d07d072a8045" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T053003Z:6681fd1d-b95f-405f-a890-d07d072a8045" ], + "Date": [ "Sun, 31 Jan 2021 05:30:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1466" ], + "Content-Length": [ "1460" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"name\":\"my-sRgVm1\",\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/MoveResources/my-sRgVm1\",\"type\":null,\"properties\":{\"provisioningState\":\"Succeeded\",\"isResolveRequired\":\"False\",\"sourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\",\"targetId\":null,\"existingTargetId\":null,\"resourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"my-tRgVm1\"},\"moveStatus\":{\"moveState\":\"PreparePending\",\"jobStatus\":null,\"errors\":{\"properties\":{\"code\":\"DependencyComputationPending\",\"message\":\"The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\u0027.\\n Possible Causes: Dependency computation is pending for resource.\\n Recommended Action: Validate dependencies to compute the dependencies.\\n \",\"details\":[{\"code\":\"TargetResourceGroupNameAlreadyExists\",\"message\":\"A resource group with the same name /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1 already exists.\\n Possible Causes: A resource group with the same name exists.\\n Recommended Action: Retry the operation by providing a different target resource group name.\\n \",\"details\":null}]}}},\"dependsOn\":[],\"dependsOnOverrides\":[],\"errors\":null,\"sourceResourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"my-sRgVm1\"}}}" + "Content": "{\"name\":\"rms-sRg\",\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg\",\"type\":null,\"properties\":{\"provisioningState\":\"Succeeded\",\"isResolveRequired\":false,\"sourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\",\"targetId\":null,\"existingTargetId\":null,\"resourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"rms-sRg-westus2\"},\"moveStatus\":{\"moveState\":\"PreparePending\",\"jobStatus\":null,\"errors\":{\"properties\":{\"code\":\"DependencyComputationPending\",\"message\":\"The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\u0027.\\n Possible Causes: Dependency computation is pending for resource.\\n Recommended Action: Validate dependencies to compute the dependencies.\\n \",\"details\":[{\"code\":\"TargetResourceGroupNameAlreadyExists\",\"message\":\"A resource group with the same name /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg already exists.\\n Possible Causes: A resource group with the same name exists.\\n Recommended Action: Retry the operation by providing a different target resource group name.\\n \",\"details\":null}]}}},\"dependsOn\":[],\"dependsOnOverrides\":[],\"errors\":null,\"sourceResourceSettings\":{\"resourceType\":\"resourceGroups\",\"targetResourceName\":\"rms-sRg\"}}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Tests.ps1 b/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Tests.ps1 index de695c369073..36b6fde5f133 100644 --- a/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Tests.ps1 +++ b/src/ResourceMover/test/Get-AzResourceMoverMoveResource.Tests.ps1 @@ -13,12 +13,12 @@ while (-not $mockingPath) { Describe 'Get-AzResourceMoverMoveResource' { It 'List' { - $moveResource = Get-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName - $moveResource.Length | Should -Be 1 + $moveResource = Get-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName + $moveResource.Length | Should -Be 1 } It 'Get' { - $moveResource = Get-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -Name "my-sRgVm1" - $moveResource.Name | Should -Be "my-sRgVm1" + $moveResource = Get-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -Name "rms-sRg" + $moveResource.Name | Should -Be "rms-sRg" } } diff --git a/src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Recording.json b/src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Recording.json new file mode 100644 index 000000000000..400db975060a --- /dev/null +++ b/src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Recording.json @@ -0,0 +1,42 @@ +{ + "Get-AzResourceMoverRequiredForResources+[NoContext]+List+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/requiredFor?sourceId=%2Fsubscriptions%2Fe80eb9fa-c996-4435-aa32-5af6f3d3077c%2FresourceGroups%2Frms-sRg\u0026api-version=2021-01-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/requiredFor?sourceId=%2Fsubscriptions%2Fe80eb9fa-c996-4435-aa32-5af6f3d3077c%2FresourceGroups%2Frms-sRg\u0026api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "d9825464-2472-4ff8-a5dd-5b5e6222d751" ], + "CommandName": [ "Get-AzResourceMoverRequiredForResources" ], + "FullCommandName": [ "Get-AzResourceMoverRequiredForResources_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "280fdfcc-7b8f-4957-9642-506e23cedf4e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "d8c2c33e-24aa-430a-a888-006d8a3de6bd" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T063035Z:d8c2c33e-24aa-430a-a888-006d8a3de6bd" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Sun, 31 Jan 2021 06:30:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "16" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sourceIds\":[]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Tests.ps1 b/src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Tests.ps1 new file mode 100644 index 000000000000..5ba071c9132f --- /dev/null +++ b/src/ResourceMover/test/Get-AzResourceMoverRequiredForResources.Tests.ps1 @@ -0,0 +1,19 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzResourceMoverRequiredForResources.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Get-AzResourceMoverRequiredForResources' { + It 'List' { + $requiredStatus = Get-AzResourceMoverRequiredForResources -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg" + $requiredStatus.Length | Should -Be 0 + } +} diff --git a/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Recording.json b/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Recording.json index 992c3d192f52..7a8ab82e13d4 100644 --- a/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Recording.json +++ b/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Recording.json @@ -1,12 +1,13 @@ { - "Get-AzResourceMoverUnresolvedDependency+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/unresolvedDependencies?api-version=2019-10-01-preview+1": { + "Get-AzResourceMoverUnresolvedDependency+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/unresolvedDependencies?dependencyLevel=Direct\u0026api-version=2021-01-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/unresolvedDependencies?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/unresolvedDependencies?dependencyLevel=Direct\u0026api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "d8dbbfa1-775e-4e8f-a5d7-7180b8d51b5c" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "800f6fa8-2db8-4e70-9b24-93bf90f5a057" ], "CommandName": [ "Get-AzResourceMoverUnresolvedDependency" ], "FullCommandName": [ "Get-AzResourceMoverUnresolvedDependency_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,20 +22,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "39efe24a-7c0f-4816-a9cf-bce5fc523b11" ], - "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "16a13a5e-23bc-46b4-8c76-943bba240f16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "x-ms-correlation-request-id": [ "2557ada9-2c8a-4a65-bc33-f1c03db42882" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102439Z:2557ada9-2c8a-4a65-bc33-f1c03db42882" ], - "Date": [ "Tue, 25 Aug 2020 10:24:39 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "4fb55dc3-1e13-4621-a3f9-cf5e6569a55f" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T051034Z:4fb55dc3-1e13-4621-a3f9-cf5e6569a55f" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Sun, 31 Jan 2021 05:10:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "28" ], + "Content-Length": [ "95" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[],\"nextLink\":null}" + "Content": "{\"value\":[],\"totalCount\":0,\"nextLink\":null,\"summaryCollection\":{\"fieldName\":null,\"summary\":[]}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Tests.ps1 b/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Tests.ps1 index e2cdb700d3a4..21b4e815c992 100644 --- a/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Tests.ps1 +++ b/src/ResourceMover/test/Get-AzResourceMoverUnresolvedDependency.Tests.ps1 @@ -13,7 +13,7 @@ while (-not $mockingPath) { Describe 'Get-AzResourceMoverUnresolvedDependency' { It 'Get' { - $response = Get-AzResourceMoverUnresolvedDependency -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName - $response.Length | Should -Be 0 + $response = Get-AzResourceMoverUnresolvedDependency -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -DependencyLevel "Direct" + $response.Length | Should -Be 0 } } diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Recording.json b/src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Recording.json new file mode 100644 index 000000000000..c79ba9e017a8 --- /dev/null +++ b/src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Recording.json @@ -0,0 +1,119 @@ +{ + "Invoke-AzResourceMoverBulkRemove+[NoContext]+BulkExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/bulkRemove?api-version=2021-01-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/bulkRemove?api-version=2021-01-01", + "Content": "{\n \"moveResources\": [ \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\" ],\n \"moveResourceInputType\": \"MoveResourceSourceId\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "154" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "108337e7-c77e-4d17-81ca-5f5fbd4b0929" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/823ab53f-2bcb-477b-9cc7-fc1f01d0facc?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "b5e7a887-ce72-44e3-8a8e-eaa8dcd1a269" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T175001Z:b5e7a887-ce72-44e3-8a8e-eaa8dcd1a269" ], + "Date": [ "Sat, 30 Jan 2021 17:50:01 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "text/plain" ], + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverBulkRemove+[NoContext]+BulkExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/823ab53f-2bcb-477b-9cc7-fc1f01d0facc?api-version=2021-01-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/823ab53f-2bcb-477b-9cc7-fc1f01d0facc?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "2431c3e8-6206-43e1-a28b-7647c31eb14d" ], + "CommandName": [ "Invoke-AzResourceMoverBulkRemove" ], + "FullCommandName": [ "Invoke-AzResourceMoverBulkRemove_BulkExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "9279ce59-59e1-47d5-9b53-2eec9cebe63f" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "27729470-219a-4b89-ad95-9788e015d448" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T175017Z:27729470-219a-4b89-ad95-9788e015d448" ], + "Date": [ "Sat, 30 Jan 2021 17:50:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "372" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/823ab53f-2bcb-477b-9cc7-fc1f01d0facc\",\"name\":\"823ab53f-2bcb-477b-9cc7-fc1f01d0facc\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:50:01 PM\",\"endTime\":\"1/30/2021 5:50:03 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverBulkRemove+[NoContext]+BulkExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/823ab53f-2bcb-477b-9cc7-fc1f01d0facc?api-version=2021-01-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/823ab53f-2bcb-477b-9cc7-fc1f01d0facc?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "2431c3e8-6206-43e1-a28b-7647c31eb14d" ], + "CommandName": [ "Invoke-AzResourceMoverBulkRemove" ], + "FullCommandName": [ "Invoke-AzResourceMoverBulkRemove_BulkExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "27d5080a-d389-452a-a7ad-6140cd2771d4" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "90e9ed23-95d5-474c-ab38-af3793b504ea" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T175018Z:90e9ed23-95d5-474c-ab38-af3793b504ea" ], + "Date": [ "Sat, 30 Jan 2021 17:50:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "372" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/823ab53f-2bcb-477b-9cc7-fc1f01d0facc\",\"name\":\"823ab53f-2bcb-477b-9cc7-fc1f01d0facc\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:50:01 PM\",\"endTime\":\"1/30/2021 5:50:03 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Tests.ps1 b/src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Tests.ps1 new file mode 100644 index 000000000000..b2bd2986ff82 --- /dev/null +++ b/src/ResourceMover/test/Invoke-AzResourceMoverBulkRemove.Tests.ps1 @@ -0,0 +1,19 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzResourceMoverBulkRemove.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Invoke-AzResourceMoverBulkRemove' { + It 'BulkExpanded' { + $bulkRemoveResponse = Invoke-AzResourceMoverBulkRemove -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg" -MoveResourceInputType "MoveResourceSourceId" + $bulkRemoveResponse.Status | Should -Be "Succeeded" + } +} diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Recording.json b/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Recording.json index ffbf323f0ce0..497c30197c9f 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Recording.json +++ b/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Recording.json @@ -1,14 +1,15 @@ { - "Invoke-AzResourceMoverCommit+[NoContext]+CommitExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/commit?api-version=2019-10-01-preview+1": { + "Invoke-AzResourceMoverCommit+[NoContext]+CommitExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/commit?api-version=2021-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/commit?api-version=2019-10-01-preview", - "Content": "{\n \"moveResources\": [ \"my-sRgVm1\" ]\n}", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/commit?api-version=2021-01-01", + "Content": "{\n \"moveResources\": [ \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\" ],\n \"moveResourceInputType\": \"MoveResourceSourceId\"\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "38" ] + "Content-Length": [ "154" ] } }, "Response": { @@ -17,31 +18,34 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "04858cfa-7307-45c2-98f8-30dddf7be7d1" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/c9876c86-bc27-4ab2-8198-12ff6da1f396?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "db0a06c6-ea67-41e1-80a6-0e94ada13724" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/762f938d-96ac-4938-bb02-af2c91e9ad79?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "7ce6ced7-8806-44f4-9f9c-0ab16370f089" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102440Z:7ce6ced7-8806-44f4-9f9c-0ab16370f089" ], - "Date": [ "Tue, 25 Aug 2020 10:24:40 GMT" ] + "x-ms-correlation-request-id": [ "ebcc3ffd-c241-4d1c-9fcb-369537bf3ab7" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T174503Z:ebcc3ffd-c241-4d1c-9fcb-369537bf3ab7" ], + "Date": [ "Sat, 30 Jan 2021 17:45:03 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Invoke-AzResourceMoverCommit+[NoContext]+CommitExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/c9876c86-bc27-4ab2-8198-12ff6da1f396?api-version=2019-10-01-preview+2": { + "Invoke-AzResourceMoverCommit+[NoContext]+CommitExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/762f938d-96ac-4938-bb02-af2c91e9ad79?api-version=2021-01-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/c9876c86-bc27-4ab2-8198-12ff6da1f396?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/762f938d-96ac-4938-bb02-af2c91e9ad79?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "d552cde9-0c15-47c1-a178-77db86bba636" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "94865fd0-468e-49ea-a8eb-13f517676c0e" ], "CommandName": [ "Invoke-AzResourceMoverCommit" ], "FullCommandName": [ "Invoke-AzResourceMoverCommit_CommitExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -55,31 +59,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c46b44e3-0655-4dd5-925b-dfca1a7a816b" ], + "x-ms-request-id": [ "d68f0d28-cf84-46e8-8341-149d486dd43e" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], - "x-ms-correlation-request-id": [ "9449c0d1-7881-42e0-9b16-981e514f6f6e" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102456Z:9449c0d1-7881-42e0-9b16-981e514f6f6e" ], - "Date": [ "Tue, 25 Aug 2020 10:24:55 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "ce521cf0-207b-4ea1-a2ec-af8b07ed13d6" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T174519Z:ce521cf0-207b-4ea1-a2ec-af8b07ed13d6" ], + "Date": [ "Sat, 30 Jan 2021 17:45:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1143" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/c9876c86-bc27-4ab2-8198-12ff6da1f396\",\"name\":\"c9876c86-bc27-4ab2-8198-12ff6da1f396\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:24:40 AM\",\"endTime\":\"8/25/2020 10:24:40 AM\",\"error\":{\"code\":\"MoveCollectionResolveRequired\",\"message\":\"The operation has failed as dependency resolution is required for one or more move resources.\\n Possible Causes: One or more resources in the move collection has dependcines that are yet to be resolved.\\n Recommended Action: Resolve dependencies and retry the operation.\\n \",\"details\":[{\"code\":\"MoveCollectionCommitOperationInvalidState\",\"message\":\"The move resources: [\\r\\n \\\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\\\",\\r\\n \\\"PreparePending\\\"\\r\\n]% are not in the valid state.\\n Possible Causes: The move resources are not in valid state.\\n Recommended Action: Resolve the issue, and retry the operation.\\n \",\"details\":null,\"additionalInfo\":null}],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/762f938d-96ac-4938-bb02-af2c91e9ad79\",\"name\":\"762f938d-96ac-4938-bb02-af2c91e9ad79\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:45:03 PM\",\"endTime\":\"1/30/2021 5:45:06 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverCommit+[NoContext]+CommitExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/c9876c86-bc27-4ab2-8198-12ff6da1f396?api-version=2019-10-01-preview+3": { + "Invoke-AzResourceMoverCommit+[NoContext]+CommitExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/762f938d-96ac-4938-bb02-af2c91e9ad79?api-version=2021-01-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/c9876c86-bc27-4ab2-8198-12ff6da1f396?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/762f938d-96ac-4938-bb02-af2c91e9ad79?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "d552cde9-0c15-47c1-a178-77db86bba636" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "94865fd0-468e-49ea-a8eb-13f517676c0e" ], "CommandName": [ "Invoke-AzResourceMoverCommit" ], "FullCommandName": [ "Invoke-AzResourceMoverCommit_CommitExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -93,20 +99,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "60cc7ddb-4a8c-4ea0-8f79-dbdbbaa764f5" ], + "x-ms-request-id": [ "e5cd73e7-2278-4b30-985b-76eeeb78cec0" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], - "x-ms-correlation-request-id": [ "defebbcb-d56e-42e7-b48c-e70cf09bc8be" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102456Z:defebbcb-d56e-42e7-b48c-e70cf09bc8be" ], - "Date": [ "Tue, 25 Aug 2020 10:24:55 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "fb0dbbd1-48e0-4bf0-b3ff-951221049a14" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T174520Z:fb0dbbd1-48e0-4bf0-b3ff-951221049a14" ], + "Date": [ "Sat, 30 Jan 2021 17:45:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1143" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/c9876c86-bc27-4ab2-8198-12ff6da1f396\",\"name\":\"c9876c86-bc27-4ab2-8198-12ff6da1f396\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:24:40 AM\",\"endTime\":\"8/25/2020 10:24:40 AM\",\"error\":{\"code\":\"MoveCollectionResolveRequired\",\"message\":\"The operation has failed as dependency resolution is required for one or more move resources.\\n Possible Causes: One or more resources in the move collection has dependcines that are yet to be resolved.\\n Recommended Action: Resolve dependencies and retry the operation.\\n \",\"details\":[{\"code\":\"MoveCollectionCommitOperationInvalidState\",\"message\":\"The move resources: [\\r\\n \\\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\\\",\\r\\n \\\"PreparePending\\\"\\r\\n]% are not in the valid state.\\n Possible Causes: The move resources are not in valid state.\\n Recommended Action: Resolve the issue, and retry the operation.\\n \",\"details\":null,\"additionalInfo\":null}],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/762f938d-96ac-4938-bb02-af2c91e9ad79\",\"name\":\"762f938d-96ac-4938-bb02-af2c91e9ad79\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:45:03 PM\",\"endTime\":\"1/30/2021 5:45:06 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Tests.ps1 b/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Tests.ps1 index 7f63d764a907..d670619b2364 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Tests.ps1 +++ b/src/ResourceMover/test/Invoke-AzResourceMoverCommit.Tests.ps1 @@ -13,7 +13,7 @@ while (-not $mockingPath) { Describe 'Invoke-AzResourceMoverCommit' { It 'CommitExpanded' { - $commitResponse = Invoke-AzResourceMoverCommit -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "my-sRgVm1" - $commitResponse.Status.Length | Should -BeGreaterOrEqual 6 + $commitResponse = Invoke-AzResourceMoverCommit -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg" -MoveResourceInputType "MoveResourceSourceId" + $commitResponse.Status | Should -Be "Succeeded" } } \ No newline at end of file diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Recording.json b/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Recording.json index d9da40cde135..f6f9bb691cab 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Recording.json +++ b/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Recording.json @@ -1,14 +1,15 @@ { - "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/discard?api-version=2019-10-01-preview+1": { + "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/discard?api-version=2021-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/discard?api-version=2019-10-01-preview", - "Content": "{\n \"moveResources\": [ \"my-sRgVm1\" ]\n}", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/discard?api-version=2021-01-01", + "Content": "{\n \"moveResources\": [ \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\" ],\n \"moveResourceInputType\": \"MoveResourceSourceId\"\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "38" ] + "Content-Length": [ "154" ] } }, "Response": { @@ -17,31 +18,160 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "02c468cf-a5ff-4172-bf69-c62270082053" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/8fdf3478-4c6a-4291-888c-a885a227398a?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "e2b17d1e-02a1-4c12-bfbf-73b630e87ed3" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "5b1b96fe-0724-4173-a034-211286753a1e" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102457Z:5b1b96fe-0724-4173-a034-211286753a1e" ], - "Date": [ "Tue, 25 Aug 2020 10:24:56 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "29499d80-c39c-4460-8a3c-ef9304987caa" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T173227Z:29499d80-c39c-4460-8a3c-ef9304987caa" ], + "Date": [ "Sat, 30 Jan 2021 17:32:26 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "330f93c3-23f7-4b30-bb57-1eee564ea722" ], + "CommandName": [ "Invoke-AzResourceMoverDiscard" ], + "FullCommandName": [ "Invoke-AzResourceMoverDiscard_DiscardExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "0bde3a01-bbef-4475-b026-1f7d6afa98c4" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "697f4dc6-3b90-4f29-9acf-f839050d2e70" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T173242Z:697f4dc6-3b90-4f29-9acf-f839050d2e70" ], + "Date": [ "Sat, 30 Jan 2021 17:32:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "352" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"name\":\"9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"status\":\"Running\",\"startTime\":\"1/30/2021 5:32:26 PM\",\"endTime\":null,\"error\":null,\"properties\":{}}", + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "330f93c3-23f7-4b30-bb57-1eee564ea722" ], + "CommandName": [ "Invoke-AzResourceMoverDiscard" ], + "FullCommandName": [ "Invoke-AzResourceMoverDiscard_DiscardExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "39ae5bb5-3e74-4497-8ede-9a2ae4aea7ff" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "cf1e1e3f-74f3-4358-bd78-500e2a21e5b2" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T173258Z:cf1e1e3f-74f3-4358-bd78-500e2a21e5b2" ], + "Date": [ "Sat, 30 Jan 2021 17:32:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "352" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"name\":\"9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"status\":\"Running\",\"startTime\":\"1/30/2021 5:32:26 PM\",\"endTime\":null,\"error\":null,\"properties\":{}}", + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "330f93c3-23f7-4b30-bb57-1eee564ea722" ], + "CommandName": [ "Invoke-AzResourceMoverDiscard" ], + "FullCommandName": [ "Invoke-AzResourceMoverDiscard_DiscardExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "ab7d8312-3733-4476-a4bd-9da066774484" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "f3293805-ceac-4cbf-9ce7-5c06a0b982d3" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T173313Z:f3293805-ceac-4cbf-9ce7-5c06a0b982d3" ], + "Date": [ "Sat, 30 Jan 2021 17:33:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "352" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"name\":\"9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"status\":\"Running\",\"startTime\":\"1/30/2021 5:32:26 PM\",\"endTime\":null,\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/8fdf3478-4c6a-4291-888c-a885a227398a?api-version=2019-10-01-preview+2": { + "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/8fdf3478-4c6a-4291-888c-a885a227398a?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "7332a7c4-a2ca-4629-93cc-e48034886a97" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "330f93c3-23f7-4b30-bb57-1eee564ea722" ], "CommandName": [ "Invoke-AzResourceMoverDiscard" ], "FullCommandName": [ "Invoke-AzResourceMoverDiscard_DiscardExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -55,31 +185,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d52895a8-4239-4f2c-bd26-02a8ffa6c65b" ], + "x-ms-request-id": [ "b5e74918-b0aa-4988-b040-8d9cb11a4074" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], - "x-ms-correlation-request-id": [ "7d32fa04-1578-4487-9b08-14b29c51972e" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102512Z:7d32fa04-1578-4487-9b08-14b29c51972e" ], - "Date": [ "Tue, 25 Aug 2020 10:25:12 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "2576cc41-74f6-44b3-a811-9bc0834c48e3" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T173329Z:2576cc41-74f6-44b3-a811-9bc0834c48e3" ], + "Date": [ "Sat, 30 Jan 2021 17:33:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1133" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/8fdf3478-4c6a-4291-888c-a885a227398a\",\"name\":\"8fdf3478-4c6a-4291-888c-a885a227398a\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:24:57 AM\",\"endTime\":\"8/25/2020 10:24:57 AM\",\"error\":{\"code\":\"MoveCollectionResolveRequired\",\"message\":\"The operation has failed as dependency resolution is required for one or more move resources.\\n Possible Causes: One or more resources in the move collection has dependcines that are yet to be resolved.\\n Recommended Action: Resolve dependencies and retry the operation.\\n \",\"details\":[{\"code\":\"MoveCollectionDiscardOperationInvalidState\",\"message\":\"The resources: [\\r\\n \\\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\\\",\\r\\n \\\"PreparePending\\\"\\r\\n]% are not in the valid state.\\n Possible Causes: The resources are not in valid state\\n Recommended Action: Resolve the issue, and retry the operation.\\n \",\"details\":null,\"additionalInfo\":null}],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"name\":\"9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:32:26 PM\",\"endTime\":\"1/30/2021 5:33:15 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/8fdf3478-4c6a-4291-888c-a885a227398a?api-version=2019-10-01-preview+3": { + "Invoke-AzResourceMoverDiscard+[NoContext]+DiscardExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/8fdf3478-4c6a-4291-888c-a885a227398a?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "7332a7c4-a2ca-4629-93cc-e48034886a97" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "330f93c3-23f7-4b30-bb57-1eee564ea722" ], "CommandName": [ "Invoke-AzResourceMoverDiscard" ], "FullCommandName": [ "Invoke-AzResourceMoverDiscard_DiscardExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -93,20 +225,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7f8f87b1-535b-4207-8d4c-0871699260d4" ], + "x-ms-request-id": [ "a95db4f5-9794-4e45-8a9c-079670fe8bd3" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], - "x-ms-correlation-request-id": [ "0e188dde-2bda-4c72-9b39-bcdd3ab891f8" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102513Z:0e188dde-2bda-4c72-9b39-bcdd3ab891f8" ], - "Date": [ "Tue, 25 Aug 2020 10:25:12 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "fc0c68e9-400e-49a4-be24-b04b5e6ef7c2" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T173329Z:fc0c68e9-400e-49a4-be24-b04b5e6ef7c2" ], + "Date": [ "Sat, 30 Jan 2021 17:33:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1133" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/8fdf3478-4c6a-4291-888c-a885a227398a\",\"name\":\"8fdf3478-4c6a-4291-888c-a885a227398a\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:24:57 AM\",\"endTime\":\"8/25/2020 10:24:57 AM\",\"error\":{\"code\":\"MoveCollectionResolveRequired\",\"message\":\"The operation has failed as dependency resolution is required for one or more move resources.\\n Possible Causes: One or more resources in the move collection has dependcines that are yet to be resolved.\\n Recommended Action: Resolve dependencies and retry the operation.\\n \",\"details\":[{\"code\":\"MoveCollectionDiscardOperationInvalidState\",\"message\":\"The resources: [\\r\\n \\\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1\\\",\\r\\n \\\"PreparePending\\\"\\r\\n]% are not in the valid state.\\n Possible Causes: The resources are not in valid state\\n Recommended Action: Resolve the issue, and retry the operation.\\n \",\"details\":null,\"additionalInfo\":null}],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"name\":\"9e8e992c-50c1-4b06-ab30-c2d159cf41fc\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:32:26 PM\",\"endTime\":\"1/30/2021 5:33:15 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Tests.ps1 b/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Tests.ps1 index e239e74ed042..06979a8623f0 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Tests.ps1 +++ b/src/ResourceMover/test/Invoke-AzResourceMoverDiscard.Tests.ps1 @@ -13,7 +13,7 @@ while(-not $mockingPath) { Describe 'Invoke-AzResourceMoverDiscard' { It 'DiscardExpanded' { - $discardResponse = Invoke-AzResourceMoverDiscard -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "my-sRgVm1" - $discardResponse.Status.Length | Should -BeGreaterOrEqual 6 + $discardResponse = Invoke-AzResourceMoverDiscard -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg" -MoveResourceInputType "MoveResourceSourceId" + $discardResponse.Status | Should -Be "Succeeded" } } diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Recording.json b/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Recording.json index 41a940c2867b..c9209723d84e 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Recording.json +++ b/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Recording.json @@ -1,14 +1,15 @@ { - "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/initiateMove?api-version=2019-10-01-preview+1": { + "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/initiateMove?api-version=2021-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/initiateMove?api-version=2019-10-01-preview", - "Content": "{\n \"moveResources\": [ \"my-sRgVm1\" ]\n}", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/initiateMove?api-version=2021-01-01", + "Content": "{\n \"moveResources\": [ \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\" ],\n \"moveResourceInputType\": \"MoveResourceSourceId\"\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "38" ] + "Content-Length": [ "154" ] } }, "Response": { @@ -17,31 +18,202 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "3b235cc0-13a3-48d6-8f1a-2dc663e623f7" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/ee17b0b1-5a71-4731-a94e-8f138d608e21?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "fafcb93a-b3f0-4840-9854-e5844e5da1cb" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "c04ff74a-e3e5-406d-acd3-a013245bf85b" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102513Z:c04ff74a-e3e5-406d-acd3-a013245bf85b" ], - "Date": [ "Tue, 25 Aug 2020 10:25:13 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "04b42248-5fee-4989-a9fc-33736203d669" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T172646Z:04b42248-5fee-4989-a9fc-33736203d669" ], + "Date": [ "Sat, 30 Jan 2021 17:26:46 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "bcb629b2-d878-4fde-80d8-7d2eae8b03cc" ], + "CommandName": [ "Invoke-AzResourceMoverInitiateMove" ], + "FullCommandName": [ "Invoke-AzResourceMoverInitiateMove_InitiateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "e5ea05b4-9642-4c75-9da0-ff5a86a5df30" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "5e406492-d62c-4d85-b27d-c76d18cae0a7" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T172702Z:5e406492-d62c-4d85-b27d-c76d18cae0a7" ], + "Date": [ "Sat, 30 Jan 2021 17:27:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "352" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38\",\"name\":\"19908abe-eff6-440e-92bf-354f9dfdba38\",\"status\":\"Running\",\"startTime\":\"1/30/2021 5:26:46 PM\",\"endTime\":null,\"error\":null,\"properties\":{}}", + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "bcb629b2-d878-4fde-80d8-7d2eae8b03cc" ], + "CommandName": [ "Invoke-AzResourceMoverInitiateMove" ], + "FullCommandName": [ "Invoke-AzResourceMoverInitiateMove_InitiateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "22410845-03df-4769-b8a2-76e6225191e4" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "a16f2d9f-9e9b-4e4a-9635-73815dd6600b" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T172718Z:a16f2d9f-9e9b-4e4a-9635-73815dd6600b" ], + "Date": [ "Sat, 30 Jan 2021 17:27:18 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "352" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38\",\"name\":\"19908abe-eff6-440e-92bf-354f9dfdba38\",\"status\":\"Running\",\"startTime\":\"1/30/2021 5:26:46 PM\",\"endTime\":null,\"error\":null,\"properties\":{}}", + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "bcb629b2-d878-4fde-80d8-7d2eae8b03cc" ], + "CommandName": [ "Invoke-AzResourceMoverInitiateMove" ], + "FullCommandName": [ "Invoke-AzResourceMoverInitiateMove_InitiateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "7c7e39d6-16bd-4730-b4cf-0e22ff095790" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "6f4f7774-fd04-4b02-8641-8ebaf4b511f2" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T172733Z:6f4f7774-fd04-4b02-8641-8ebaf4b511f2" ], + "Date": [ "Sat, 30 Jan 2021 17:27:33 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "352" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38\",\"name\":\"19908abe-eff6-440e-92bf-354f9dfdba38\",\"status\":\"Running\",\"startTime\":\"1/30/2021 5:26:46 PM\",\"endTime\":null,\"error\":null,\"properties\":{}}", + "isContentBase64": false + } + }, + "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "bcb629b2-d878-4fde-80d8-7d2eae8b03cc" ], + "CommandName": [ "Invoke-AzResourceMoverInitiateMove" ], + "FullCommandName": [ "Invoke-AzResourceMoverInitiateMove_InitiateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Retry-After": [ "15" ], + "x-ms-request-id": [ "4587d7da-0473-4cf7-908e-51cc35f995e5" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "0c36f9ea-e21a-40eb-940d-eca4fbaebfae" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T172749Z:0c36f9ea-e21a-40eb-940d-eca4fbaebfae" ], + "Date": [ "Sat, 30 Jan 2021 17:27:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "352" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38\",\"name\":\"19908abe-eff6-440e-92bf-354f9dfdba38\",\"status\":\"Running\",\"startTime\":\"1/30/2021 5:26:46 PM\",\"endTime\":null,\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/ee17b0b1-5a71-4731-a94e-8f138d608e21?api-version=2019-10-01-preview+2": { + "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/ee17b0b1-5a71-4731-a94e-8f138d608e21?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "1527b0e4-5eab-40f2-9dc6-e5b45d07a0a7" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "bcb629b2-d878-4fde-80d8-7d2eae8b03cc" ], "CommandName": [ "Invoke-AzResourceMoverInitiateMove" ], "FullCommandName": [ "Invoke-AzResourceMoverInitiateMove_InitiateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -55,31 +227,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6368482f-21fb-4188-a9e0-bec43fd8e7f7" ], + "x-ms-request-id": [ "ddddb4c5-ffe5-4f13-8a70-e7621fea213d" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], - "x-ms-correlation-request-id": [ "881701d7-ac85-49f5-9a58-8827a0de8cf1" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102529Z:881701d7-ac85-49f5-9a58-8827a0de8cf1" ], - "Date": [ "Tue, 25 Aug 2020 10:25:28 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "05a459b8-d7e4-4820-a708-779612f2249f" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T172805Z:05a459b8-d7e4-4820-a708-779612f2249f" ], + "Date": [ "Sat, 30 Jan 2021 17:28:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "782" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/ee17b0b1-5a71-4731-a94e-8f138d608e21\",\"name\":\"ee17b0b1-5a71-4731-a94e-8f138d608e21\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:25:13 AM\",\"endTime\":\"8/25/2020 10:25:14 AM\",\"error\":{\"code\":\"DefaultResourceSettingsInvalid\",\"message\":\"\\n The operation has failed as move resources contain resource settings validation errors.\\n Possible Causes: The resources /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1 contain resource settings validation error.\\n Recommended Action: Fix the inputs, and retry the operation.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38\",\"name\":\"19908abe-eff6-440e-92bf-354f9dfdba38\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:26:46 PM\",\"endTime\":\"1/30/2021 5:27:54 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/ee17b0b1-5a71-4731-a94e-8f138d608e21?api-version=2019-10-01-preview+3": { + "Invoke-AzResourceMoverInitiateMove+[NoContext]+InitiateExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/ee17b0b1-5a71-4731-a94e-8f138d608e21?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "1527b0e4-5eab-40f2-9dc6-e5b45d07a0a7" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "bcb629b2-d878-4fde-80d8-7d2eae8b03cc" ], "CommandName": [ "Invoke-AzResourceMoverInitiateMove" ], "FullCommandName": [ "Invoke-AzResourceMoverInitiateMove_InitiateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -93,20 +267,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8af19b21-9cfa-4ea0-9b1a-ff4edeae3cd1" ], + "x-ms-request-id": [ "349200c4-cee4-4567-9ac6-0616e0dcba41" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], - "x-ms-correlation-request-id": [ "f4d82415-e1e0-4ada-856b-5daba9b72e14" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102529Z:f4d82415-e1e0-4ada-856b-5daba9b72e14" ], - "Date": [ "Tue, 25 Aug 2020 10:25:28 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "951daf27-2efa-4eb4-876e-d3ebf712a6ba" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T172805Z:951daf27-2efa-4eb4-876e-d3ebf712a6ba" ], + "Date": [ "Sat, 30 Jan 2021 17:28:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "782" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/ee17b0b1-5a71-4731-a94e-8f138d608e21\",\"name\":\"ee17b0b1-5a71-4731-a94e-8f138d608e21\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:25:13 AM\",\"endTime\":\"8/25/2020 10:25:14 AM\",\"error\":{\"code\":\"DefaultResourceSettingsInvalid\",\"message\":\"\\n The operation has failed as move resources contain resource settings validation errors.\\n Possible Causes: The resources /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1 contain resource settings validation error.\\n Recommended Action: Fix the inputs, and retry the operation.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/19908abe-eff6-440e-92bf-354f9dfdba38\",\"name\":\"19908abe-eff6-440e-92bf-354f9dfdba38\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:26:46 PM\",\"endTime\":\"1/30/2021 5:27:54 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Tests.ps1 b/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Tests.ps1 index 1197a60a9117..a2d43598aa6e 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Tests.ps1 +++ b/src/ResourceMover/test/Invoke-AzResourceMoverInitiateMove.Tests.ps1 @@ -13,8 +13,8 @@ while (-not $mockingPath) { Describe 'Invoke-AzResourceMoverInitiateMove' { It 'InitiateExpanded' { - $moveResponse = Invoke-AzResourceMoverInitiateMove -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "my-sRgVm1" - $moveResponse.Status.Length | Should -BeGreaterOrEqual 6 + $moveResponse = Invoke-AzResourceMoverInitiateMove -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg" -MoveResourceInputType "MoveResourceSourceId" + $moveResponse.Status | Should -Be "Succeeded" } } diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Recording.json b/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Recording.json index ae0acc228fba..a8e21ea6c576 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Recording.json +++ b/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Recording.json @@ -1,12 +1,13 @@ { - "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/resolveDependencies?api-version=2019-10-01-preview+1": { + "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/resolveDependencies?api-version=2021-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/resolveDependencies?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/resolveDependencies?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "22" ], - "x-ms-client-request-id": [ "dd87d667-595e-4210-888b-3800a5af37c5" ], + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "5b8f2b0f-4b18-4d3e-a65e-c42ae16078d4" ], "CommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency" ], "FullCommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency_Resolve" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -22,31 +23,34 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "477b4920-3019-48f3-a200-ec38d22073c6" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/5ca545e2-eaec-4e2b-8ea0-6206212a4332?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "f2e25e7c-b2d6-4c24-b28e-b9669f22f607" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/8bd224b8-b547-441e-b435-1a0b3dd530e8?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "e4d72cfe-5788-487a-a677-b05132f9862c" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102530Z:e4d72cfe-5788-487a-a677-b05132f9862c" ], - "Date": [ "Tue, 25 Aug 2020 10:25:29 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "1834d4b4-2645-4bc9-aac0-74d7546476ae" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T171924Z:1834d4b4-2645-4bc9-aac0-74d7546476ae" ], + "Date": [ "Sat, 30 Jan 2021 17:19:23 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/5ca545e2-eaec-4e2b-8ea0-6206212a4332?api-version=2019-10-01-preview+2": { + "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/8bd224b8-b547-441e-b435-1a0b3dd530e8?api-version=2021-01-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/5ca545e2-eaec-4e2b-8ea0-6206212a4332?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/8bd224b8-b547-441e-b435-1a0b3dd530e8?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "dd87d667-595e-4210-888b-3800a5af37c5" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "5b8f2b0f-4b18-4d3e-a65e-c42ae16078d4" ], "CommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency" ], "FullCommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency_Resolve" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,31 +64,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f7d07370-efd0-4135-8d5d-00f3aaf3296d" ], + "x-ms-request-id": [ "2964eeb0-7bf7-44af-817e-e68861953057" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], - "x-ms-correlation-request-id": [ "f10d009b-19dc-42f0-baa8-a610060cc97e" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102546Z:f10d009b-19dc-42f0-baa8-a610060cc97e" ], - "Date": [ "Tue, 25 Aug 2020 10:25:45 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "2d7b7d36-b1da-4f86-9303-8aad436aca1b" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T171940Z:2d7b7d36-b1da-4f86-9303-8aad436aca1b" ], + "Date": [ "Sat, 30 Jan 2021 17:19:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "815" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/5ca545e2-eaec-4e2b-8ea0-6206212a4332\",\"name\":\"5ca545e2-eaec-4e2b-8ea0-6206212a4332\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:25:30 AM\",\"endTime\":\"8/25/2020 10:25:32 AM\",\"error\":{\"code\":\"MoveCollectionValidateDependenciesOperationFailed\",\"message\":\"The validate dependencies operation of one or more resource has failed. Check the move status of the resource for more details.\\n Possible Causes: The validate dependencies operation of one or more resource has failed.\\n Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/8bd224b8-b547-441e-b435-1a0b3dd530e8\",\"name\":\"8bd224b8-b547-441e-b435-1a0b3dd530e8\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:19:24 PM\",\"endTime\":\"1/30/2021 5:19:25 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/5ca545e2-eaec-4e2b-8ea0-6206212a4332?api-version=2019-10-01-preview+3": { + "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/8bd224b8-b547-441e-b435-1a0b3dd530e8?api-version=2021-01-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/5ca545e2-eaec-4e2b-8ea0-6206212a4332?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/8bd224b8-b547-441e-b435-1a0b3dd530e8?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "dd87d667-595e-4210-888b-3800a5af37c5" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "5b8f2b0f-4b18-4d3e-a65e-c42ae16078d4" ], "CommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency" ], "FullCommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency_Resolve" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -98,32 +104,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "23d19935-0886-4963-a752-b1934f6cee9f" ], + "x-ms-request-id": [ "60c176a9-7210-4fe0-9cba-b4beda8554da" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], - "x-ms-correlation-request-id": [ "519ffdb1-2560-443b-a388-d7855866434d" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102546Z:519ffdb1-2560-443b-a388-d7855866434d" ], - "Date": [ "Tue, 25 Aug 2020 10:25:45 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "13fb2e17-7a23-4ed3-8280-c3b47250ae48" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T171940Z:13fb2e17-7a23-4ed3-8280-c3b47250ae48" ], + "Date": [ "Sat, 30 Jan 2021 17:19:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "815" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/5ca545e2-eaec-4e2b-8ea0-6206212a4332\",\"name\":\"5ca545e2-eaec-4e2b-8ea0-6206212a4332\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:25:30 AM\",\"endTime\":\"8/25/2020 10:25:32 AM\",\"error\":{\"code\":\"MoveCollectionValidateDependenciesOperationFailed\",\"message\":\"The validate dependencies operation of one or more resource has failed. Check the move status of the resource for more details.\\n Possible Causes: The validate dependencies operation of one or more resource has failed.\\n Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/8bd224b8-b547-441e-b435-1a0b3dd530e8\",\"name\":\"8bd224b8-b547-441e-b435-1a0b3dd530e8\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:19:24 PM\",\"endTime\":\"1/30/2021 5:19:25 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/prepare?api-version=2019-10-01-preview+4": { + "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/prepare?api-version=2021-01-01+4": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/prepare?api-version=2019-10-01-preview", - "Content": "{\n \"moveResources\": [ \"my-sRgVm1\" ]\n}", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/prepare?api-version=2021-01-01", + "Content": "{\n \"moveResources\": [ \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg\" ],\n \"moveResourceInputType\": \"MoveResourceSourceId\"\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "38" ] + "Content-Length": [ "154" ] } }, "Response": { @@ -132,31 +140,34 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "3af6fe3b-0184-408d-a1a4-0fabf1356ca6" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/14b4b152-ccca-4841-9ed8-be4fb83471bb?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "80f9b706-6e62-40a9-8963-7d9064c8caa1" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/73e68e79-6c1c-4ba5-aae0-a2ca577049f6?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "4ff33d9b-6342-4b6c-8f59-483336a252d2" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102546Z:4ff33d9b-6342-4b6c-8f59-483336a252d2" ], - "Date": [ "Tue, 25 Aug 2020 10:25:45 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "386f39a7-006e-4f36-a07a-688d3df2f280" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T171941Z:386f39a7-006e-4f36-a07a-688d3df2f280" ], + "Date": [ "Sat, 30 Jan 2021 17:19:41 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/14b4b152-ccca-4841-9ed8-be4fb83471bb?api-version=2019-10-01-preview+5": { + "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/73e68e79-6c1c-4ba5-aae0-a2ca577049f6?api-version=2021-01-01+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/14b4b152-ccca-4841-9ed8-be4fb83471bb?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/73e68e79-6c1c-4ba5-aae0-a2ca577049f6?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "2cddffd2-5afc-4639-b229-be1dbef3fbb6" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "179399a9-3703-4a76-9375-ead073c6e95d" ], "CommandName": [ "Invoke-AzResourceMoverPrepare" ], "FullCommandName": [ "Invoke-AzResourceMoverPrepare_PrepareExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -170,31 +181,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4de91afa-33a4-4231-b027-f422fcd1064b" ], + "x-ms-request-id": [ "890bc498-93da-419d-92ad-0835f9bbe81f" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], - "x-ms-correlation-request-id": [ "bcb14a8b-30e3-49d7-bc6c-e057bdc2ee78" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102602Z:bcb14a8b-30e3-49d7-bc6c-e057bdc2ee78" ], - "Date": [ "Tue, 25 Aug 2020 10:26:01 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-correlation-request-id": [ "e836c098-e54f-46d1-ae7d-f75a2814b49b" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T171957Z:e836c098-e54f-46d1-ae7d-f75a2814b49b" ], + "Date": [ "Sat, 30 Jan 2021 17:19:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "782" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/14b4b152-ccca-4841-9ed8-be4fb83471bb\",\"name\":\"14b4b152-ccca-4841-9ed8-be4fb83471bb\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:25:46 AM\",\"endTime\":\"8/25/2020 10:25:46 AM\",\"error\":{\"code\":\"DefaultResourceSettingsInvalid\",\"message\":\"\\n The operation has failed as move resources contain resource settings validation errors.\\n Possible Causes: The resources /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1 contain resource settings validation error.\\n Recommended Action: Fix the inputs, and retry the operation.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/73e68e79-6c1c-4ba5-aae0-a2ca577049f6\",\"name\":\"73e68e79-6c1c-4ba5-aae0-a2ca577049f6\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:19:41 PM\",\"endTime\":\"1/30/2021 5:19:43 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/14b4b152-ccca-4841-9ed8-be4fb83471bb?api-version=2019-10-01-preview+6": { + "Invoke-AzResourceMoverPrepare+[NoContext]+PrepareExpanded+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/73e68e79-6c1c-4ba5-aae0-a2ca577049f6?api-version=2021-01-01+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/14b4b152-ccca-4841-9ed8-be4fb83471bb?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/73e68e79-6c1c-4ba5-aae0-a2ca577049f6?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "27" ], - "x-ms-client-request-id": [ "2cddffd2-5afc-4639-b229-be1dbef3fbb6" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "179399a9-3703-4a76-9375-ead073c6e95d" ], "CommandName": [ "Invoke-AzResourceMoverPrepare" ], "FullCommandName": [ "Invoke-AzResourceMoverPrepare_PrepareExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -208,20 +221,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "573299d8-6540-4911-ae01-dfd482e10a8b" ], + "x-ms-request-id": [ "9f00fa6a-bd80-401e-ab36-88b8a01f121c" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], - "x-ms-correlation-request-id": [ "d2552108-cc8f-4998-b2f4-591dca7675af" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102602Z:d2552108-cc8f-4998-b2f4-591dca7675af" ], - "Date": [ "Tue, 25 Aug 2020 10:26:01 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-correlation-request-id": [ "99dd3eab-bbee-4158-b786-8c85c7884e86" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T171957Z:99dd3eab-bbee-4158-b786-8c85c7884e86" ], + "Date": [ "Sat, 30 Jan 2021 17:19:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "782" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/14b4b152-ccca-4841-9ed8-be4fb83471bb\",\"name\":\"14b4b152-ccca-4841-9ed8-be4fb83471bb\",\"status\":\"Failed\",\"startTime\":\"8/25/2020 10:25:46 AM\",\"endTime\":\"8/25/2020 10:25:46 AM\",\"error\":{\"code\":\"DefaultResourceSettingsInvalid\",\"message\":\"\\n The operation has failed as move resources contain resource settings validation errors.\\n Possible Causes: The resources /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/my-sRgVm1 contain resource settings validation error.\\n Recommended Action: Fix the inputs, and retry the operation.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/73e68e79-6c1c-4ba5-aae0-a2ca577049f6\",\"name\":\"73e68e79-6c1c-4ba5-aae0-a2ca577049f6\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 5:19:41 PM\",\"endTime\":\"1/30/2021 5:19:43 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Tests.ps1 b/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Tests.ps1 index e6766b2a5ad3..ad734b80ce81 100644 --- a/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Tests.ps1 +++ b/src/ResourceMover/test/Invoke-AzResourceMoverPrepare.Tests.ps1 @@ -12,9 +12,9 @@ while(-not $mockingPath) { . ($mockingPath | Select-Object -First 1).FullName Describe 'Invoke-AzResourceMoverPrepare' { - It 'PrepareExpanded' { - Resolve-AzResourceMoverMoveCollectionDependency -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName - $prepareResponse = Invoke-AzResourceMoverPrepare -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "my-sRgVm1" - $prepareResponse.Status.Length | Should -BeGreaterOrEqual 6 + It 'PrepareExpanded' { + Resolve-AzResourceMoverMoveCollectionDependency -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName + $prepareResponse = Invoke-AzResourceMoverPrepare -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -MoveResource "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rms-sRg" -MoveResourceInputType "MoveResourceSourceId" + $prepareResponse.Status | Should -Be "Succeeded" } } diff --git a/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Recording.json b/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Recording.json index 5bd79dc0e63b..7d84536c214d 100644 --- a/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Recording.json +++ b/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Recording.json @@ -1,14 +1,15 @@ { - "New-AzResourceMoverMoveCollection+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection?api-version=2019-10-01-preview+1": { + "New-AzResourceMoverMoveCollection+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms?api-version=2021-01-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection?api-version=2019-10-01-preview", - "Content": "{\n \"properties\": {\n \"sourceRegion\": \"centralus\",\n \"targetRegion\": \"westcentralus\"\n },\n \"location\": \"EastUs2\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms?api-version=2021-01-01", + "Content": "{\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"sourceRegion\": \"westus\",\n \"targetRegion\": \"westus2\"\n },\n \"location\": \"EastUs2EUAP\"\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "119" ] + "Content-Length": [ "164" ] } }, "Response": { @@ -16,21 +17,22 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"68013c4b-0000-0200-0000-5f44e73b0000\"" ], - "x-ms-request-id": [ "812f563a-aaa0-4d92-8a0b-0ee30797cd65" ], + "ETag": [ "\"1c00b1f7-0000-3400-0000-601554340000\"" ], + "x-ms-request-id": [ "0a903323-3838-4286-95d0-4a24f794a0b0" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "dd9bbc18-92b9-4da8-835e-67758763e9a6" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102603Z:dd9bbc18-92b9-4da8-835e-67758763e9a6" ], - "Date": [ "Tue, 25 Aug 2020 10:26:02 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "48abb75c-8080-4daf-acbe-e57ad9172744" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T124231Z:48abb75c-8080-4daf-acbe-e57ad9172744" ], + "Date": [ "Sat, 30 Jan 2021 12:42:31 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "418" ], + "Content-Length": [ "556" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection\",\"name\":\"my-movecollection\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"68013c4b-0000-0200-0000-5f44e73b0000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms\",\"name\":\"MoveCollection-rms\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"1c00b1f7-0000-3400-0000-601554340000\\\"\",\"location\":\"eastus2euap\",\"properties\":{\"sourceRegion\":\"westus\",\"targetRegion\":\"westus2\",\"provisioningState\":\"Succeeded\",\"errors\":null},\"identity\":{\"principalId\":\"5bfcb894-eafb-491d-a32d-527e1559d4b9\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Tests.ps1 b/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Tests.ps1 index 70254203e61f..bc511a1a04dd 100644 --- a/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Tests.ps1 +++ b/src/ResourceMover/test/New-AzResourceMoverMoveCollection.Tests.ps1 @@ -13,7 +13,7 @@ while(-not $mockingPath) { Describe 'New-AzResourceMoverMoveCollection' { It 'CreateExpanded' { - $moveCollection = New-AzResourceMoverMoveCollection -Name $env.moveCollectionName -ResourceGroupName $env.moveCollectionMetadataRG -SubscriptionId $env.SubscriptionId -SourceRegion "centralus" -TargetRegion "westcentralus" -Location "EastUs2" - $moveCollection.Name | Should -Be $env.moveCollectionName + $moveCollection = New-AzResourceMoverMoveCollection -Name $env.moveCollectionName -ResourceGroupName $env.moveCollectionMetadataRG -SubscriptionId $env.SubscriptionId -SourceRegion "westus" -TargetRegion "westus2" -Location "EastUs2EUAP" -IdentityType "SystemAssigned" + $moveCollection.Name | Should -Be $env.moveCollectionName } -} +} \ No newline at end of file diff --git a/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Recording.json b/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Recording.json index b1f3fbdc28f6..aefc495afcc5 100644 --- a/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Recording.json +++ b/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Recording.json @@ -1,14 +1,15 @@ { - "Remove-AzResourceMoverMoveCollection+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/testMoveCollection?api-version=2019-10-01-preview+1": { + "Remove-AzResourceMoverMoveCollection+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveColRemoveTest?api-version=2021-01-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/testMoveCollection?api-version=2019-10-01-preview", - "Content": "{\n \"properties\": {\n \"sourceRegion\": \"centralus\",\n \"targetRegion\": \"westcentralus\"\n },\n \"location\": \"EastUs2\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveColRemoveTest?api-version=2021-01-01", + "Content": "{\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"sourceRegion\": \"eastus\",\n \"targetRegion\": \"westus2\"\n },\n \"location\": \"eastus2euap\"\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "119" ] + "Content-Length": [ "164" ] } }, "Response": { @@ -16,31 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"6801827a-0000-0200-0000-5f44e7430000\"" ], - "x-ms-request-id": [ "0fb289d2-2346-4c1a-a3ab-37e2b910ac36" ], + "ETag": [ "\"4d0024a8-0000-3400-0000-601909750000\"" ], + "x-ms-request-id": [ "043d9aae-5e5f-4b09-bff7-5878604d5f79" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "cd707302-2ba6-4721-88c3-7bb629506c24" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102614Z:cd707302-2ba6-4721-88c3-7bb629506c24" ], - "Date": [ "Tue, 25 Aug 2020 10:26:14 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "56c53b4e-722c-4d46-ba38-5be0a1a527ad" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210202T081239Z:56c53b4e-722c-4d46-ba38-5be0a1a527ad" ], + "Date": [ "Tue, 02 Feb 2021 08:12:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "420" ], + "Content-Length": [ "554" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/testMoveCollection\",\"name\":\"testMoveCollection\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"6801827a-0000-0200-0000-5f44e7430000\\\"\",\"location\":\"eastus2\",\"properties\":{\"sourceRegion\":\"centralus\",\"targetRegion\":\"westcentralus\",\"provisioningState\":\"Succeeded\",\"errors\":null}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveColRemoveTest\",\"name\":\"MoveColRemoveTest\",\"type\":\"Microsoft.Migrate/moveCollections\",\"etag\":\"\\\"4d0024a8-0000-3400-0000-601909750000\\\"\",\"location\":\"eastus2euap\",\"properties\":{\"sourceRegion\":\"eastus\",\"targetRegion\":\"westus2\",\"provisioningState\":\"Succeeded\",\"errors\":null},\"identity\":{\"principalId\":\"9f2d905c-2fc0-43e2-b78d-70056de0ec4f\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"}}", + "isContentBase64": false } }, - "Remove-AzResourceMoverMoveCollection+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/testMoveCollection?api-version=2019-10-01-preview+2": { + "Remove-AzResourceMoverMoveCollection+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveColRemoveTest?api-version=2021-01-01+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/testMoveCollection?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveColRemoveTest?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "fb43a86d-eb0a-4db4-8323-6fc7f832e641" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "3f63c2e0-9d9f-4693-821a-956b1578a847" ], "CommandName": [ "Remove-AzResourceMoverMoveCollection" ], "FullCommandName": [ "Remove-AzResourceMoverMoveCollection_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -51,23 +54,107 @@ } }, "Response": { - "StatusCode": 200, + "StatusCode": 202, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/providers/Microsoft.Migrate/locations/eastus2euap/rmsOperationResults/a35f22db-296a-4971-93a1-e16e8a6b253d?api-version=2021-01-01\u0026operationResultResponseType=Location" ], + "Retry-After": [ "0" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/providers/Microsoft.Migrate/locations/eastus2euap/rmsOperationResults/a35f22db-296a-4971-93a1-e16e8a6b253d?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-request-id": [ "fe02dd5e-dda6-4a74-a5a1-d63dae3186c6" ], - "x-ms-correlation-request-id": [ "fe02dd5e-dda6-4a74-a5a1-d63dae3186c6" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102617Z:fe02dd5e-dda6-4a74-a5a1-d63dae3186c6" ], - "Date": [ "Tue, 25 Aug 2020 10:26:17 GMT" ] + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "f838543d-fbcc-47f6-88ac-c198308ea502" ], + "x-ms-correlation-request-id": [ "f838543d-fbcc-47f6-88ac-c198308ea502" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210202T081240Z:f838543d-fbcc-47f6-88ac-c198308ea502" ], + "Date": [ "Tue, 02 Feb 2021 08:12:39 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false + } + }, + "Remove-AzResourceMoverMoveCollection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/providers/Microsoft.Migrate/locations/eastus2euap/rmsOperationResults/a35f22db-296a-4971-93a1-e16e8a6b253d?api-version=2021-01-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/providers/Microsoft.Migrate/locations/eastus2euap/rmsOperationResults/a35f22db-296a-4971-93a1-e16e8a6b253d?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "3f63c2e0-9d9f-4693-821a-956b1578a847" ], + "CommandName": [ "Remove-AzResourceMoverMoveCollection" ], + "FullCommandName": [ "Remove-AzResourceMoverMoveCollection_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "f94258db-ed91-41f5-b2ea-fb29b6571521" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "04c2e17d-c952-4b4e-8643-8667ac2d4ea9" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210202T081240Z:04c2e17d-c952-4b4e-8643-8667ac2d4ea9" ], + "Date": [ "Tue, 02 Feb 2021 08:12:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "303" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveColRemoveTest/operations/a35f22db-296a-4971-93a1-e16e8a6b253d\",\"name\":null,\"status\":\"Succeeded\",\"startTime\":null,\"endTime\":null,\"error\":null,\"properties\":null}", + "isContentBase64": false + } + }, + "Remove-AzResourceMoverMoveCollection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/providers/Microsoft.Migrate/locations/eastus2euap/rmsOperationResults/a35f22db-296a-4971-93a1-e16e8a6b253d?api-version=2021-01-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/providers/Microsoft.Migrate/locations/eastus2euap/rmsOperationResults/a35f22db-296a-4971-93a1-e16e8a6b253d?api-version=2021-01-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "3f63c2e0-9d9f-4693-821a-956b1578a847" ], + "CommandName": [ "Remove-AzResourceMoverMoveCollection" ], + "FullCommandName": [ "Remove-AzResourceMoverMoveCollection_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "cb9897a4-c655-4952-abc5-57298021a4ad" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "0efb7387-3e6d-418b-a03d-7edd44f13e03" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210202T081241Z:0efb7387-3e6d-418b-a03d-7edd44f13e03" ], + "Date": [ "Tue, 02 Feb 2021 08:12:40 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "303" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveColRemoveTest/operations/a35f22db-296a-4971-93a1-e16e8a6b253d\",\"name\":null,\"status\":\"Succeeded\",\"startTime\":null,\"endTime\":null,\"error\":null,\"properties\":null}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Tests.ps1 b/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Tests.ps1 index fbd51438d673..9e1d5e7f6d5d 100644 --- a/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Tests.ps1 +++ b/src/ResourceMover/test/Remove-AzResourceMoverMoveCollection.Tests.ps1 @@ -12,9 +12,11 @@ while(-not $mockingPath) { . ($mockingPath | Select-Object -First 1).FullName Describe 'Remove-AzResourceMoverMoveCollection' { - It 'Delete'{ - $moveCollectionName = "testMoveCollection" - New-AzResourceMoverMoveCollection -Name $moveCollectionName -ResourceGroupName $env.moveCollectionMetadataRG -SubscriptionId $env.SubscriptionId -SourceRegion "centralus" -TargetRegion "westcentralus" -Location "EastUs2" - Remove-AzResourceMoverMoveCollection -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $moveCollectionName + It 'Delete' { + $moveCollectionName = "MoveColRemoveTest" + $moveCollection = New-AzResourceMoverMoveCollection -Name $moveCollectionName -ResourceGroupName $env.moveCollectionMetadataRG -SubscriptionId $env.SubscriptionId -SourceRegion "eastus" -TargetRegion "westus2" -Location "eastus2euap" -IdentityType "SystemAssigned" + $moveCollection.Name | Should -Be $moveCollectionName + $removeResp = Remove-AzResourceMoverMoveCollection -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $moveCollectionName + $removeResp.Status | Should -Be "Succeeded" } } diff --git a/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Recording.json b/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Recording.json index c28759b06ccd..4d7d26ca12c6 100644 --- a/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Recording.json +++ b/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Recording.json @@ -1,122 +1,13 @@ { - "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1-vnet?api-version=2019-10-01-preview+1": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1-vnet?api-version=2019-10-01-preview", - "Content": "{\n \"properties\": {\n \"resourceSettings\": {\n \"resourceType\": \"Microsoft.Network/virtualNetworks\",\n \"targetResourceName\": \"my-sRgVm1-vnet\"\n },\n \"sourceId\": \"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/ps-sRgplb1/providers/Microsoft.Network/virtualNetworks/ps-sRgplb1-vnet\"\n }\n}", - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "318" ] - } - }, - "Response": { - "StatusCode": 202, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "Retry-After": [ "15" ], - "x-ms-request-id": [ "350ebdf4-862b-4f30-9e54-e6ee6b11fb0f" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/bf2a9b50-5542-4d83-83d6-27094a8cfcec?api-version=2019-10-01-preview" ], - "X-Content-Type-Options": [ "nosniff" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "ff8b79f1-a97a-4bc6-b9d4-8b5d173f83f5" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102618Z:ff8b79f1-a97a-4bc6-b9d4-8b5d173f83f5" ], - "Date": [ "Tue, 25 Aug 2020 10:26:18 GMT" ] - }, - "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] - }, - "Content": null - } - }, - "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/bf2a9b50-5542-4d83-83d6-27094a8cfcec?api-version=2019-10-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/bf2a9b50-5542-4d83-83d6-27094a8cfcec?api-version=2019-10-01-preview", - "Content": null, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "c4e8974a-dd0a-4331-b73c-affa69fd8078" ], - "CommandName": [ "Add-AzResourceMoverMoveResource" ], - "FullCommandName": [ "Add-AzResourceMoverMoveResource_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a66160e2-b4d6-496d-971d-95d31566dfaa" ], - "X-Content-Type-Options": [ "nosniff" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], - "x-ms-correlation-request-id": [ "df2730b1-35bd-4f9c-8bf3-f443c75194d0" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102633Z:df2730b1-35bd-4f9c-8bf3-f443c75194d0" ], - "Date": [ "Tue, 25 Aug 2020 10:26:33 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "372" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/bf2a9b50-5542-4d83-83d6-27094a8cfcec\",\"name\":\"bf2a9b50-5542-4d83-83d6-27094a8cfcec\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:26:18 AM\",\"endTime\":\"8/25/2020 10:26:19 AM\",\"error\":null,\"properties\":{}}" - } - }, - "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1-vnet?api-version=2019-10-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1-vnet?api-version=2019-10-01-preview", - "Content": null, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "c4e8974a-dd0a-4331-b73c-affa69fd8078" ], - "CommandName": [ "Add-AzResourceMoverMoveResource" ], - "FullCommandName": [ "Add-AzResourceMoverMoveResource_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9f371db0-49d7-4d6f-a021-1ce35a559644" ], - "X-Content-Type-Options": [ "nosniff" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], - "x-ms-correlation-request-id": [ "cae46a18-9aa2-4bcf-85c3-5d94a8e96b99" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102634Z:cae46a18-9aa2-4bcf-85c3-5d94a8e96b99" ], - "Date": [ "Tue, 25 Aug 2020 10:26:33 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1694" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"name\":\"my-sRgVm1-vnet\",\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/MoveResources/my-sRgVm1-vnet\",\"type\":null,\"properties\":{\"provisioningState\":\"Succeeded\",\"isResolveRequired\":\"False\",\"sourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/ps-sRgplb1/providers/Microsoft.Network/virtualNetworks/ps-sRgplb1-vnet\",\"targetId\":null,\"existingTargetId\":null,\"resourceSettings\":{\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"enableDdosProtection\":null,\"addressSpace\":null,\"dnsServers\":null,\"subnets\":null,\"targetResourceName\":\"my-sRgVm1-vnet\"},\"moveStatus\":{\"moveState\":\"PreparePending\",\"jobStatus\":null,\"errors\":{\"properties\":{\"code\":\"DependencyComputationPending\",\"message\":\"The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/ps-sRgplb1/providers/Microsoft.Network/virtualNetworks/ps-sRgplb1-vnet\u0027.\\n Possible Causes: Dependency computation is pending for resource.\\n Recommended Action: Validate dependencies to compute the dependencies.\\n \",\"details\":[]}}},\"dependsOn\":[],\"dependsOnOverrides\":[],\"errors\":null,\"sourceResourceSettings\":{\"resourceType\":\"Microsoft.Network/virtualNetworks\",\"enableDdosProtection\":null,\"addressSpace\":[\"10.86.0.0/16\"],\"dnsServers\":[],\"subnets\":[{\"name\":\"subnet-1\",\"addressPrefix\":\"10.86.0.0/24\",\"networkSecurityGroup\":{\"sourceArmResourceId\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/cleanupservice/providers/Microsoft.Network/networkSecurityGroups/rg-cleanupservice-nsg6\"}}],\"targetResourceName\":\"ps-sRgplb1-vnet\"}}}" - } - }, - "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1-vnet?api-version=2019-10-01-preview+4": { + "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/moveResources/my-sRgVm1-vnet?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/moveResources/rms-sRg?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "34" ], - "x-ms-client-request-id": [ "25b33459-4e1f-4c74-bdae-be2923f8d0bd" ], + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "7825822e-1b56-4ad9-9141-befd99106a47" ], "CommandName": [ "Remove-AzResourceMoverMoveResource" ], "FullCommandName": [ "Remove-AzResourceMoverMoveResource_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -132,31 +23,34 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "912ba021-c69c-45c2-aba0-d94e674adf7d" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4eb1992c-9219-446f-bdae-c38d5e2498ff?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "4ba21483-ba95-4f93-80ec-3e2b499a46ef" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/21db08b2-0de1-4a52-9c6b-6eec817bdb6f?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], - "x-ms-correlation-request-id": [ "fb6b638f-b82b-4557-90c4-30ecfeecaccd" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102634Z:fb6b638f-b82b-4557-90c4-30ecfeecaccd" ], - "Date": [ "Tue, 25 Aug 2020 10:26:34 GMT" ] + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "80dd5d71-7f6b-49f4-9c8a-a3f7f4ff52fa" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T064542Z:80dd5d71-7f6b-49f4-9c8a-a3f7f4ff52fa" ], + "Date": [ "Sun, 31 Jan 2021 06:45:41 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4eb1992c-9219-446f-bdae-c38d5e2498ff?api-version=2019-10-01-preview+5": { + "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/21db08b2-0de1-4a52-9c6b-6eec817bdb6f?api-version=2021-01-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4eb1992c-9219-446f-bdae-c38d5e2498ff?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/21db08b2-0de1-4a52-9c6b-6eec817bdb6f?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "25b33459-4e1f-4c74-bdae-be2923f8d0bd" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "7825822e-1b56-4ad9-9141-befd99106a47" ], "CommandName": [ "Remove-AzResourceMoverMoveResource" ], "FullCommandName": [ "Remove-AzResourceMoverMoveResource_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -170,31 +64,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a649ffb3-b3a9-4cd9-a16b-c633dbf8b23b" ], + "x-ms-request-id": [ "83c393a5-f56a-45fc-9375-57210f88c54d" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], - "x-ms-correlation-request-id": [ "df1aca4e-9b43-42db-85b2-fb38b9898066" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102650Z:df1aca4e-9b43-42db-85b2-fb38b9898066" ], - "Date": [ "Tue, 25 Aug 2020 10:26:49 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "a460486d-7a0a-490d-b940-fbbea4c654c6" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T064557Z:a460486d-7a0a-490d-b940-fbbea4c654c6" ], + "Date": [ "Sun, 31 Jan 2021 06:45:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4eb1992c-9219-446f-bdae-c38d5e2498ff\",\"name\":\"4eb1992c-9219-446f-bdae-c38d5e2498ff\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:26:34 AM\",\"endTime\":\"8/25/2020 10:26:35 AM\",\"error\":null,\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/21db08b2-0de1-4a52-9c6b-6eec817bdb6f\",\"name\":\"21db08b2-0de1-4a52-9c6b-6eec817bdb6f\",\"status\":\"Succeeded\",\"startTime\":\"1/31/2021 6:45:42 AM\",\"endTime\":\"1/31/2021 6:45:43 AM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4eb1992c-9219-446f-bdae-c38d5e2498ff?api-version=2019-10-01-preview+6": { + "Remove-AzResourceMoverMoveResource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/21db08b2-0de1-4a52-9c6b-6eec817bdb6f?api-version=2021-01-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4eb1992c-9219-446f-bdae-c38d5e2498ff?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/21db08b2-0de1-4a52-9c6b-6eec817bdb6f?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "36" ], - "x-ms-client-request-id": [ "25b33459-4e1f-4c74-bdae-be2923f8d0bd" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "7825822e-1b56-4ad9-9141-befd99106a47" ], "CommandName": [ "Remove-AzResourceMoverMoveResource" ], "FullCommandName": [ "Remove-AzResourceMoverMoveResource_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -208,20 +104,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1a325f14-f1ec-4250-8ae6-8e32a7139baf" ], + "x-ms-request-id": [ "696f7606-0559-4db6-9e25-c16425e1208f" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], - "x-ms-correlation-request-id": [ "171a3478-c3d5-4581-9600-a1bfc1459f3d" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102650Z:171a3478-c3d5-4581-9600-a1bfc1459f3d" ], - "Date": [ "Tue, 25 Aug 2020 10:26:50 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "acb1a408-0b88-4e86-b9f0-bc359745311d" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210131T064558Z:acb1a408-0b88-4e86-b9f0-bc359745311d" ], + "Date": [ "Sun, 31 Jan 2021 06:45:58 GMT" ] }, "ContentHeaders": { "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/4eb1992c-9219-446f-bdae-c38d5e2498ff\",\"name\":\"4eb1992c-9219-446f-bdae-c38d5e2498ff\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:26:34 AM\",\"endTime\":\"8/25/2020 10:26:35 AM\",\"error\":null,\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/21db08b2-0de1-4a52-9c6b-6eec817bdb6f\",\"name\":\"21db08b2-0de1-4a52-9c6b-6eec817bdb6f\",\"status\":\"Succeeded\",\"startTime\":\"1/31/2021 6:45:42 AM\",\"endTime\":\"1/31/2021 6:45:43 AM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Tests.ps1 b/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Tests.ps1 index f9e75aa8b5be..265697d6837f 100644 --- a/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Tests.ps1 +++ b/src/ResourceMover/test/Remove-AzResourceMoverMoveResource.Tests.ps1 @@ -13,8 +13,7 @@ while(-not $mockingPath) { Describe 'Remove-AzResourceMoverMoveResource' { It 'Delete' { - Add-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/ps-sRgplb1/providers/Microsoft.Network/virtualNetworks/ps-sRgplb1-vnet" -Name my-sRgVm1-vnet -ResourceSettingResourceType "Microsoft.Network/virtualNetworks" -ResourceSettingTargetResourceName my-sRgVm1-vnet - $response = Remove-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -Name my-sRgVm1-vnet - $response.Status | Should -Be "Succeeded" + $response = Remove-AzResourceMoverMoveResource -SubscriptionId $env.SubscriptionId -ResourceGroupName $env.moveCollectionMetadataRG -MoveCollectionName $env.moveCollectionName -Name "rms-sRg" + $response.Status | Should -Be "Succeeded" } } diff --git a/src/ResourceMover/test/Resolve-AzResourceMoverMoveCollectionDependency.Recording.json b/src/ResourceMover/test/Resolve-AzResourceMoverMoveCollectionDependency.Recording.json index 1dc07c7e05a7..5b52e0b2f808 100644 --- a/src/ResourceMover/test/Resolve-AzResourceMoverMoveCollectionDependency.Recording.json +++ b/src/ResourceMover/test/Resolve-AzResourceMoverMoveCollectionDependency.Recording.json @@ -1,12 +1,13 @@ { - "Resolve-AzResourceMoverMoveCollectionDependency+[NoContext]+Resolve+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/resolveDependencies?api-version=2019-10-01-preview+1": { + "Resolve-AzResourceMoverMoveCollectionDependency+[NoContext]+Resolve+$POST+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/resolveDependencies?api-version=2021-01-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/moveCollections/my-movecollection/resolveDependencies?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/resolveDependencies?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "37" ], - "x-ms-client-request-id": [ "88192da2-dfe3-428d-9e4b-994d28b07786" ], + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "398b6bb6-6159-49f1-89c8-bbd6e893bafb" ], "CommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency" ], "FullCommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency_Resolve" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -22,31 +23,34 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "Retry-After": [ "15" ], - "x-ms-request-id": [ "ef4871e1-7717-43ad-a2bb-57f0259fda35" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/55085459-258e-40eb-80b9-18057bfc7693?api-version=2019-10-01-preview" ], + "x-ms-request-id": [ "a4b37e1b-88a6-465e-a38c-705e68bb7b20" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/268cd7ac-2577-4685-a68e-298bb31a7920?api-version=2021-01-01" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-correlation-request-id": [ "968a6801-e227-4ab0-98b4-689a341ed4e9" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102651Z:968a6801-e227-4ab0-98b4-689a341ed4e9" ], - "Date": [ "Tue, 25 Aug 2020 10:26:50 GMT" ] + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "f820f370-f803-4bb1-81db-e9eff0c6db2a" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T162813Z:f820f370-f803-4bb1-81db-e9eff0c6db2a" ], + "Date": [ "Sat, 30 Jan 2021 16:28:12 GMT" ] }, "ContentHeaders": { + "Content-Type": [ "text/plain" ], "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Resolve-AzResourceMoverMoveCollectionDependency+[NoContext]+Resolve+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/55085459-258e-40eb-80b9-18057bfc7693?api-version=2019-10-01-preview+2": { + "Resolve-AzResourceMoverMoveCollectionDependency+[NoContext]+Resolve+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/268cd7ac-2577-4685-a68e-298bb31a7920?api-version=2021-01-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/55085459-258e-40eb-80b9-18057bfc7693?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/268cd7ac-2577-4685-a68e-298bb31a7920?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "88192da2-dfe3-428d-9e4b-994d28b07786" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "398b6bb6-6159-49f1-89c8-bbd6e893bafb" ], "CommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency" ], "FullCommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency_Resolve" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,31 +64,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7fb9c271-0ac1-4806-974e-f9c9f0136465" ], + "x-ms-request-id": [ "e63e6b7d-6a3a-44ec-81bd-ee932b808642" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], - "x-ms-correlation-request-id": [ "be288caa-2828-4339-9d9c-bac217d6ad9a" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102706Z:be288caa-2828-4339-9d9c-bac217d6ad9a" ], - "Date": [ "Tue, 25 Aug 2020 10:27:06 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "62ff30ad-3422-4d6c-bcdb-60ffc265a1cf" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T162829Z:62ff30ad-3422-4d6c-bcdb-60ffc265a1cf" ], + "Date": [ "Sat, 30 Jan 2021 16:28:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "815" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/55085459-258e-40eb-80b9-18057bfc7693\",\"name\":\"55085459-258e-40eb-80b9-18057bfc7693\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:26:50 AM\",\"endTime\":\"8/25/2020 10:26:52 AM\",\"error\":{\"code\":\"MoveCollectionValidateDependenciesOperationFailed\",\"message\":\"The validate dependencies operation of one or more resource has failed. Check the move status of the resource for more details.\\n Possible Causes: The validate dependencies operation of one or more resource has failed.\\n Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/268cd7ac-2577-4685-a68e-298bb31a7920\",\"name\":\"268cd7ac-2577-4685-a68e-298bb31a7920\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 4:28:13 PM\",\"endTime\":\"1/30/2021 4:28:16 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } }, - "Resolve-AzResourceMoverMoveCollectionDependency+[NoContext]+Resolve+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/55085459-258e-40eb-80b9-18057bfc7693?api-version=2019-10-01-preview+3": { + "Resolve-AzResourceMoverMoveCollectionDependency+[NoContext]+Resolve+$GET+https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/268cd7ac-2577-4685-a68e-298bb31a7920?api-version=2021-01-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/55085459-258e-40eb-80b9-18057bfc7693?api-version=2019-10-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/268cd7ac-2577-4685-a68e-298bb31a7920?api-version=2021-01-01", "Content": null, + "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "39" ], - "x-ms-client-request-id": [ "88192da2-dfe3-428d-9e4b-994d28b07786" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "398b6bb6-6159-49f1-89c8-bbd6e893bafb" ], "CommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency" ], "FullCommandName": [ "Resolve-AzResourceMoverMoveCollectionDependency_Resolve" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -98,20 +104,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a763bf00-b7bd-467f-8e62-5d3f45223fe0" ], + "x-ms-request-id": [ "ec0599b4-3efe-4a0a-bfb4-af834b5135f8" ], "X-Content-Type-Options": [ "nosniff" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], - "x-ms-correlation-request-id": [ "43f557c6-9b35-4195-bcc8-64758cbd691f" ], - "x-ms-routing-request-id": [ "SOUTHINDIA:20200825T102706Z:43f557c6-9b35-4195-bcc8-64758cbd691f" ], - "Date": [ "Tue, 25 Aug 2020 10:27:06 GMT" ] + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "512273f8-ae5d-41f8-94d1-0a4fbe44990e" ], + "x-ms-routing-request-id": [ "SOUTHINDIA:20210130T162829Z:512273f8-ae5d-41f8-94d1-0a4fbe44990e" ], + "Date": [ "Sat, 30 Jan 2021 16:28:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "815" ], + "Content-Length": [ "372" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/rg-my-moveCollection/providers/Microsoft.Migrate/MoveCollections/my-movecollection/operations/55085459-258e-40eb-80b9-18057bfc7693\",\"name\":\"55085459-258e-40eb-80b9-18057bfc7693\",\"status\":\"Succeeded\",\"startTime\":\"8/25/2020 10:26:50 AM\",\"endTime\":\"8/25/2020 10:26:52 AM\",\"error\":{\"code\":\"MoveCollectionValidateDependenciesOperationFailed\",\"message\":\"The validate dependencies operation of one or more resource has failed. Check the move status of the resource for more details.\\n Possible Causes: The validate dependencies operation of one or more resource has failed.\\n Recommended Action: Retry the operation after resolving errors if any. If issue persists, contact support.\\n \",\"details\":[],\"additionalInfo\":null},\"properties\":{}}" + "Content": "{\"id\":\"/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/MoveCollection-RG-rms/providers/Microsoft.Migrate/moveCollections/MoveCollection-rms/operations/268cd7ac-2577-4685-a68e-298bb31a7920\",\"name\":\"268cd7ac-2577-4685-a68e-298bb31a7920\",\"status\":\"Succeeded\",\"startTime\":\"1/30/2021 4:28:13 PM\",\"endTime\":\"1/30/2021 4:28:16 PM\",\"error\":null,\"properties\":{}}", + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/ResourceMover/test/env.json b/src/ResourceMover/test/env.json index 1ab11e77685b..03b40797f324 100644 --- a/src/ResourceMover/test/env.json +++ b/src/ResourceMover/test/env.json @@ -1,6 +1,6 @@ { - "SubscriptionId": "e80eb9fa-c996-4435-aa32-5af6f3d3077c", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "moveCollectionMetadataRG": "rg-my-moveCollection", - "moveCollectionName": "my-movecollection" + "SubscriptionId": "e80eb9fa-c996-4435-aa32-5af6f3d3077c", + "moveCollectionName": "MoveCollection-rms", + "moveCollectionMetadataRG": "MoveCollection-RG-rms" } diff --git a/src/ResourceMover/test/localEnv.json b/src/ResourceMover/test/localEnv.json index 273518a8e179..d0ac3eb9ff7f 100644 --- a/src/ResourceMover/test/localEnv.json +++ b/src/ResourceMover/test/localEnv.json @@ -1,6 +1,6 @@ { "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "moveCollectionName": "my-movecollection", - "SubscriptionId": "e80eb9fa-c996-4435-aa32-5af6f3d3077c", - "moveCollectionMetadataRG": "rg-my-moveCollection" + "moveCollectionName": "MoveCollection-rms", + "moveCollectionMetadataRG": "MoveCollection-RG-rms", + "SubscriptionId": "e80eb9fa-c996-4435-aa32-5af6f3d3077c" } diff --git a/src/ResourceMover/test/utils.ps1 b/src/ResourceMover/test/utils.ps1 index 24022671725d..25532ecd4e46 100644 --- a/src/ResourceMover/test/utils.ps1 +++ b/src/ResourceMover/test/utils.ps1 @@ -12,8 +12,8 @@ function setupEnv() { $SubscriptionId = (Get-AzContext).Subscription.Id $null = $env.Add("SubscriptionId", $SubscriptionId) $env.Tenant = (Get-AzContext).Tenant.Id - $null = $env.Add("moveCollectionMetadataRG", "rg-my-moveCollection") - $null = $env.Add("moveCollectionName", "my-movecollection") + $null = $env.Add("moveCollectionMetadataRG", "MoveCollection-RG-rms") + $null = $env.Add("moveCollectionName", "MoveCollection-rms") # For any resources you created for test, you should add it to $env here. $envFile = 'env.json' if ($TestMode -eq 'live') { diff --git a/src/ResourceMover/utils/Unprotect-SecureString.ps1 b/src/ResourceMover/utils/Unprotect-SecureString.ps1 new file mode 100644 index 000000000000..cb05b51a6220 --- /dev/null +++ b/src/ResourceMover/utils/Unprotect-SecureString.ps1 @@ -0,0 +1,16 @@ +#This script converts securestring to plaintext + +param( + [Parameter(Mandatory, ValueFromPipeline)] + [System.Security.SecureString] + ${SecureString} +) + +$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) +try { + $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) +} finally { + [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr) +} + +return $plaintext \ No newline at end of file