From 66c7bfbb865201df90587d0ac80a3ceff646cabb Mon Sep 17 00:00:00 2001 From: azurepowershell Date: Wed, 19 May 2021 05:25:49 +0000 Subject: [PATCH 1/2] Move Migrate to release-2021-05-25 --- src/Migrate/Az.Migrate.psd1 | 6 +- src/Migrate/Az.Migrate.psm1 | 2 +- src/Migrate/build-module.ps1 | 4 + src/Migrate/check-dependencies.ps1 | 2 +- src/Migrate/create-model-cmdlets.ps1 | 165 ++++++++++++++++++ ...ize-AzMigrateReplicationInfrastructure.ps1 | 24 +-- src/Migrate/generate-info.json | 10 +- src/Migrate/generated/api/Migrate.cs | 14 +- .../FilterClause.PowerShell.cs | 4 +- .../FilterQueryOption.PowerShell.cs | 4 +- .../ODataQueryContext.PowerShell.cs | 4 +- .../ODataQueryOptions1.PowerShell.cs | 4 +- .../runtime/BuildTime/MarkdownRenderer.cs | 2 +- src/Migrate/generated/runtime/Extensions.cs | 2 +- src/Migrate/help/New-AzMigrateProject.md | 2 +- src/Migrate/readme.md | 1 + src/Migrate/run-module.ps1 | 2 + src/Migrate/test-module.ps1 | 6 +- 18 files changed, 217 insertions(+), 41 deletions(-) create mode 100644 src/Migrate/create-model-cmdlets.ps1 diff --git a/src/Migrate/Az.Migrate.psd1 b/src/Migrate/Az.Migrate.psd1 index 0c00c1c68c4a..b069bfb88a6b 100644 --- a/src/Migrate/Az.Migrate.psd1 +++ b/src/Migrate/Az.Migrate.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 3/23/2021 +# Generated on: 5/19/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 = '' @@ -124,7 +124,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* Nullref Bug fixed in get discovered server and initialize replication infrastructure commandlets.' + # ReleaseNotes = '' # Prerelease string of this module # Prerelease = '' diff --git a/src/Migrate/Az.Migrate.psm1 b/src/Migrate/Az.Migrate.psm1 index 1b9b742c877a..2c51f749aaaa 100644 --- a/src/Migrate/Az.Migrate.psm1 +++ b/src/Migrate/Az.Migrate.psm1 @@ -34,7 +34,7 @@ if(-not $accountsModule) { 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-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 add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } Write-Information "Loaded Module '$($accountsModule.Name)'" diff --git a/src/Migrate/build-module.ps1 b/src/Migrate/build-module.ps1 index a789f5781e04..f1d5953071fa 100644 --- a/src/Migrate/build-module.ps1 +++ b/src/Migrate/build-module.ps1 @@ -120,6 +120,10 @@ $moduleName = 'Az.Migrate' $examplesFolder = Join-Path $PSScriptRoot 'examples' $null = New-Item -ItemType Directory -Force -Path $examplesFolder +Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' +$modelCmdlets = @() +. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') -Models $modelCmdlets + if($NoDocs) { Write-Host -ForegroundColor Green 'Creating exports...' Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder diff --git a/src/Migrate/check-dependencies.ps1 b/src/Migrate/check-dependencies.ps1 index 7ada900d8f0e..657140612d88 100644 --- a/src/Migrate/check-dependencies.ps1 +++ b/src/Migrate/check-dependencies.ps1 @@ -53,7 +53,7 @@ $tools = Join-Path $PSScriptRoot 'tools' $resourceDir = Join-Path $tools 'Resources' $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1' -if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) { +if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) { Write-Host -ForegroundColor Green "Building local Resource module used for test..." Set-Location $resourceDir $null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources diff --git a/src/Migrate/create-model-cmdlets.ps1 b/src/Migrate/create-model-cmdlets.ps1 new file mode 100644 index 000000000000..71da1002d8a0 --- /dev/null +++ b/src/Migrate/create-model-cmdlets.ps1 @@ -0,0 +1,165 @@ +# ---------------------------------------------------------------------------------- +# +# 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. +# ---------------------------------------------------------------------------------- + +param([string[]]$Models) + +if ($Models.Count -eq 0) +{ + return +} + +$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' +$ModuleName = 'Az.Migrate'.Split(".")[1] +$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' +$null = New-Item -ItemType Directory -Force -Path $OutputDir + +$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs +$Content = '' +$null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) + { $Content += get-content $_.fullname -raw + } } + +$Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) +$Nodes = $Tree.ChildNodes().ChildNodes() +foreach ($Model in $Models) +{ + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") } + if ($InterfaceNode.count -eq 0) { + continue + } + # through a queue, we iterate all the parent models. + $Queue = @($InterfaceNode) + $visited = @("I$Model") + $AllInterfaceNodes = @() + while ($Queue.count -ne 0) + { + $AllInterfaceNodes += $Queue[0] + # Baselist contains the direct parent models. + foreach ($parent in $Queue[0].BaseList.Types) + { + if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value))) + { + $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) }) + $visited = [Array]$visited + $parent.Type.Right.Identifier.Value + } + } + $first, $Queue = $Queue + } + + $Namespace = $InterfaceNode.Parent.Name + $ObjectType = $Model + $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" + # remove duplicated module name + if ($ObjectType.StartsWith($ModuleName)) { + $ModulePrefix = '' + } else { + $ModulePrefix = $ModuleName + } + $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir + + $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string] + $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string] + foreach ($Node in $AllInterfaceNodes) + { + foreach ($Member in $Node.Members) + { + $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments + $Required = $false + $Description = "" + $Readonly = $False + foreach ($Argument in $Arguments) + { + if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") + { + $Required = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Description") + { + $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"') + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly") + { + $Readonly = $Argument.Expression.Token.Value + } + } + if ($Readonly) + { + continue + } + $Identifier = $Member.Identifier.Value + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] + if ($Required) + { + $ParameterDefinePropertyList.Add("Mandatory") + } + if ($Description -ne "") + { + $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") + } + $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + $ParameterDefineScript = " + [Parameter($ParameterDefineProperty)] + [${Type}] + `$${Identifier}" + $ParameterDefineScriptList.Add($ParameterDefineScript) + $ParameterAssignScriptList.Add(" + `$Object.${Identifier} = `$${Identifier}") + } + } + $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," + $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + + $Script = " +# ---------------------------------------------------------------------------------- +# +# 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 +Create a in-memory object for ${ObjectType} +.Description +Create a in-memory object for ${ObjectType} + +.Outputs +${ObjectTypeWithNamespace} +.Link +https://docs.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +#> +function New-Az${ModulePrefix}${ObjectType}Object { + [OutputType('${ObjectTypeWithNamespace}')] + [CmdletBinding(PositionalBinding=`$false)] + Param( +${ParameterDefineScript} + ) + + process { + `$Object = [${ObjectTypeWithNamespace}]::New() +${ParameterAssignScript} + return `$Object + } +} +" + Set-Content -Path $OutputPath -Value $Script +} diff --git a/src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 b/src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 index 3b021bc72ba4..1937bfb35b6c 100644 --- a/src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 +++ b/src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 @@ -179,31 +179,33 @@ public static int hashForArtifact(String artifact) } "@ - # Get all appliances and sites in the project - $solution = Get-AzMigrateSolution -MigrateProjectName $ProjectName -ResourceGroupName $ResourceGroupName -Name "Servers-Migration-ServerMigration" - $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] + #Get vault name from SMS solution. + $smsSolution = Get-AzMigrateSolution -MigrateProjectName $ProjectName -ResourceGroupName $ResourceGroupName -Name "Servers-Migration-ServerMigration" + $VaultName = $smsSolution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] + # Get all appliances and sites in the project from SDS solution. + $sdsSolution = Get-AzMigrateSolution -MigrateProjectName $ProjectName -ResourceGroupName $ResourceGroupName -Name "Servers-Discovery-ServerDiscovery" $appMap = @{} - if ($null -ne $solution.DetailExtendedDetail["applianceNameToSiteIdMapV2"]) { - $appMapV2 = $solution.DetailExtendedDetail["applianceNameToSiteIdMapV2"] | ConvertFrom-Json + if ($null -ne $sdsSolution.DetailExtendedDetail["applianceNameToSiteIdMapV2"]) { + $appMapV2 = $sdsSolution.DetailExtendedDetail["applianceNameToSiteIdMapV2"] | ConvertFrom-Json # Fetch all appliance from V2 map first. Then these can be updated if found again in V3 map. foreach ($item in $appMapV2) { $appMap[$item.ApplianceName] = $item.SiteId } } - if ($null -ne $solution.DetailExtendedDetail["applianceNameToSiteIdMapV3"]) { - $appMapV3 = $solution.DetailExtendedDetail["applianceNameToSiteIdMapV3"] | ConvertFrom-Json + if ($null -ne $sdsSolution.DetailExtendedDetail["applianceNameToSiteIdMapV3"]) { + $appMapV3 = $sdsSolution.DetailExtendedDetail["applianceNameToSiteIdMapV3"] | ConvertFrom-Json foreach ($item in $appMapV3) { $t = $item.psobject.properties $appMap[$t.Name] = $t.Value.SiteId } } - if ($null -eq $solution.DetailExtendedDetail["applianceNameToSiteIdMapV2"] -And - $null -eq $solution.DetailExtendedDetail["applianceNameToSiteIdMapV3"] ) { - throw "Server Migration Solution missing Appliance Details. Invalid Solution." + if ($null -eq $sdsSolution.DetailExtendedDetail["applianceNameToSiteIdMapV2"] -And + $null -eq $sdsSolution.DetailExtendedDetail["applianceNameToSiteIdMapV3"] ) { + throw "Server Discovery Solution missing Appliance Details. Invalid Solution." } foreach ($eachApp in $appMap.GetEnumerator()) { @@ -512,4 +514,4 @@ public static int hashForArtifact(String artifact) Write-Host "Finished successfully." return $true } -} \ No newline at end of file +} diff --git a/src/Migrate/generate-info.json b/src/Migrate/generate-info.json index 3f8ace8f9ca6..2cf9f460a684 100644 --- a/src/Migrate/generate-info.json +++ b/src/Migrate/generate-info.json @@ -1,8 +1,8 @@ { - "autorest_powershell": "3.0.424", - "autorest_modelerfour": "4.15.414", + "autorest": "`-- (empty)", + "swagger_commit": "5d617cf399806989dc17934ef5ca38f5545e8175", + "autorest_powershell": "3.0.430", + "autorest_core": "3.4.2", "node": "v14.15.5", - "autorest_core": "3.2.1", - "swagger_commit": "2dd0ae5b100fee900dc0d2369401c6ab63e75f18", - "autorest": "`-- (empty)" + "autorest_modelerfour": "4.15.414" } diff --git a/src/Migrate/generated/api/Migrate.cs b/src/Migrate/generated/api/Migrate.cs index d1d4462604db..1199d3ad7865 100644 --- a/src/Migrate/generated/api/Migrate.cs +++ b/src/Migrate/generated/api/Migrate.cs @@ -1432,7 +1432,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.424\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.430\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -1945,7 +1945,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.424\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.430\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -4443,7 +4443,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.424\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.430\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -5815,7 +5815,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.424\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.430\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -5983,7 +5983,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.424\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.430\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -35910,7 +35910,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.424\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.430\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -37665,7 +37665,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.424\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.430\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/FilterClause.PowerShell.cs b/src/Migrate/generated/api/Models/Api20180901Preview/FilterClause.PowerShell.cs index cb0745392484..48135363369c 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/FilterClause.PowerShell.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/FilterClause.PowerShell.cs @@ -90,10 +90,10 @@ internal FilterClause(global::System.Collections.IDictionary content) ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariable = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IRangeVariable) content.GetValueForProperty("RangeVariable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariable, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.RangeVariableTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemType = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ItemType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemType, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableName = (string) content.GetValueForProperty("RangeVariableName",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ExpressionTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionKind = (string) content.GetValueForProperty("ExpressionKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionKind, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("RangeVariableTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ItemTypeDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeIsNullable = (bool?) content.GetValueForProperty("ItemTypeIsNullable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeIsNullable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReferenceDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ExpressionTypeReferenceDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReferenceDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); @@ -124,10 +124,10 @@ internal FilterClause(global::System.Management.Automation.PSObject content) ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariable = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IRangeVariable) content.GetValueForProperty("RangeVariable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariable, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.RangeVariableTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemType = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ItemType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemType, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableName = (string) content.GetValueForProperty("RangeVariableName",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ExpressionTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionKind = (string) content.GetValueForProperty("ExpressionKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionKind, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("RangeVariableTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ItemTypeDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeIsNullable = (bool?) content.GetValueForProperty("ItemTypeIsNullable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ItemTypeIsNullable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReferenceDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ExpressionTypeReferenceDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterClauseInternal)this).ExpressionTypeReferenceDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/FilterQueryOption.PowerShell.cs b/src/Migrate/generated/api/Models/Api20180901Preview/FilterQueryOption.PowerShell.cs index bb8cfc4f4294..553109199c6e 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/FilterQueryOption.PowerShell.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/FilterQueryOption.PowerShell.cs @@ -94,10 +94,10 @@ internal FilterQueryOption(global::System.Collections.IDictionary content) ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseExpression = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISingleValueNode) content.GetValueForProperty("FilterClauseExpression",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseExpression, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.SingleValueNodeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseItemType = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("FilterClauseItemType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseItemType, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableName = (string) content.GetValueForProperty("RangeVariableName",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ExpressionTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionKind = (string) content.GetValueForProperty("ExpressionKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionKind, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("RangeVariableTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ItemTypeDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeIsNullable = (bool?) content.GetValueForProperty("ItemTypeIsNullable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeIsNullable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReferenceDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ExpressionTypeReferenceDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReferenceDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); @@ -132,10 +132,10 @@ internal FilterQueryOption(global::System.Management.Automation.PSObject content ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseExpression = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISingleValueNode) content.GetValueForProperty("FilterClauseExpression",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseExpression, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.SingleValueNodeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseItemType = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("FilterClauseItemType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).FilterClauseItemType, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableName = (string) content.GetValueForProperty("RangeVariableName",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ExpressionTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionKind = (string) content.GetValueForProperty("ExpressionKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionKind, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("RangeVariableTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ItemTypeDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeIsNullable = (bool?) content.GetValueForProperty("ItemTypeIsNullable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ItemTypeIsNullable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReferenceDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ExpressionTypeReferenceDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IFilterQueryOptionInternal)this).ExpressionTypeReferenceDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryContext.PowerShell.cs b/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryContext.PowerShell.cs index ed0637c362d9..6c7a3fd74168 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryContext.PowerShell.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryContext.PowerShell.cs @@ -100,13 +100,13 @@ internal ODataQueryContext(global::System.Collections.IDictionary content) ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).Path = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataPath) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).Path, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ODataPathTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ElementClrType = (string) content.GetValueForProperty("ElementClrType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ElementClrType, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).RequestContainer = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.IAny) content.GetValueForProperty("RequestContainer",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).RequestContainer, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop = (int?) content.GetValueForProperty("DefaultQuerySettingMaxTop",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ODataPath = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataPathSegment[]) content.GetValueForProperty("ODataPath",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ODataPath, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ODataPathSegmentTypeConverter.ConvertFrom)); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableExpand = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableExpand",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableExpand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableSelect = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableSelect",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableSelect, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableCount = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableCount",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableCount, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableOrderBy = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableOrderBy",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableOrderBy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableFilter = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableFilter",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableFilter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop = (int?) content.GetValueForProperty("DefaultQuerySettingMaxTop",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelEntityContainer = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmEntityContainer) content.GetValueForProperty("ModelEntityContainer",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelEntityContainer, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmEntityContainerTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelSchemaElement = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmSchemaElement[]) content.GetValueForProperty("ModelSchemaElement",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelSchemaElement, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmSchemaElementTypeConverter.ConvertFrom)); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelVocabularyAnnotation = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmVocabularyAnnotation[]) content.GetValueForProperty("ModelVocabularyAnnotation",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelVocabularyAnnotation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmVocabularyAnnotationTypeConverter.ConvertFrom)); @@ -163,13 +163,13 @@ internal ODataQueryContext(global::System.Management.Automation.PSObject content ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).Path = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataPath) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).Path, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ODataPathTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ElementClrType = (string) content.GetValueForProperty("ElementClrType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ElementClrType, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).RequestContainer = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.IAny) content.GetValueForProperty("RequestContainer",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).RequestContainer, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop = (int?) content.GetValueForProperty("DefaultQuerySettingMaxTop",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ODataPath = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataPathSegment[]) content.GetValueForProperty("ODataPath",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ODataPath, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ODataPathSegmentTypeConverter.ConvertFrom)); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableExpand = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableExpand",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableExpand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableSelect = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableSelect",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableSelect, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableCount = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableCount",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableCount, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableOrderBy = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableOrderBy",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableOrderBy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableFilter = (bool?) content.GetValueForProperty("DefaultQuerySettingEnableFilter",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingEnableFilter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop = (int?) content.GetValueForProperty("DefaultQuerySettingMaxTop",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).DefaultQuerySettingMaxTop, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelEntityContainer = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmEntityContainer) content.GetValueForProperty("ModelEntityContainer",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelEntityContainer, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmEntityContainerTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelSchemaElement = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmSchemaElement[]) content.GetValueForProperty("ModelSchemaElement",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelSchemaElement, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmSchemaElementTypeConverter.ConvertFrom)); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelVocabularyAnnotation = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmVocabularyAnnotation[]) content.GetValueForProperty("ModelVocabularyAnnotation",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryContextInternal)this).ModelVocabularyAnnotation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmVocabularyAnnotationTypeConverter.ConvertFrom)); diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryOptions1.PowerShell.cs b/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryOptions1.PowerShell.cs index c825563f8bbd..e6dd45e9bb0a 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryOptions1.PowerShell.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/ODataQueryOptions1.PowerShell.cs @@ -102,10 +102,10 @@ internal ODataQueryOptions1(global::System.Collections.IDictionary content) ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseExpression = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISingleValueNode) content.GetValueForProperty("FilterClauseExpression",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseExpression, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.SingleValueNodeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseItemType = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("FilterClauseItemType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseItemType, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableName = (string) content.GetValueForProperty("RangeVariableName",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ExpressionTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionKind = (string) content.GetValueForProperty("ExpressionKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionKind, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("RangeVariableTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ItemTypeDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeIsNullable = (bool?) content.GetValueForProperty("ItemTypeIsNullable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeIsNullable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReferenceDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ExpressionTypeReferenceDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReferenceDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); @@ -141,10 +141,10 @@ internal ODataQueryOptions1(global::System.Management.Automation.PSObject conten ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseExpression = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISingleValueNode) content.GetValueForProperty("FilterClauseExpression",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseExpression, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.SingleValueNodeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseItemType = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("FilterClauseItemType",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).FilterClauseItemType, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableName = (string) content.GetValueForProperty("RangeVariableName",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("ExpressionTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionKind = (string) content.GetValueForProperty("ExpressionKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionKind, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableTypeReference = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmTypeReference) content.GetValueForProperty("RangeVariableTypeReference",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableTypeReference, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeReferenceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind = (int?) content.GetValueForProperty("RangeVariableKind",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).RangeVariableKind, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ItemTypeDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeIsNullable = (bool?) content.GetValueForProperty("ItemTypeIsNullable",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ItemTypeIsNullable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReferenceDefinition = (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IIedmType) content.GetValueForProperty("ExpressionTypeReferenceDefinition",((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IODataQueryOptions1Internal)this).ExpressionTypeReferenceDefinition, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IedmTypeTypeConverter.ConvertFrom); diff --git a/src/Migrate/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/Migrate/generated/runtime/BuildTime/MarkdownRenderer.cs index af0041d91af3..9a43b9575af6 100644 --- a/src/Migrate/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/Migrate/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -79,7 +79,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); foreach (var alias in markdownInfo.Aliases) { - sb.Append($"### {alias}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); } if (markdownInfo.ComplexInterfaceInfos.Any()) { diff --git a/src/Migrate/generated/runtime/Extensions.cs b/src/Migrate/generated/runtime/Extensions.cs index 46aa20c7509f..eaac5b498e49 100644 --- a/src/Migrate/generated/runtime/Extensions.cs +++ b/src/Migrate/generated/runtime/Extensions.cs @@ -50,7 +50,7 @@ internal static void AddIf(T value, string serializedName, System.Actionthe HttpResponseMessage to fetch a header from /// the header name /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching - internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => headerName == each.Key).Value?.FirstOrDefault() ?? string.Empty; + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; /// /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, diff --git a/src/Migrate/help/New-AzMigrateProject.md b/src/Migrate/help/New-AzMigrateProject.md index e32e07c3f228..373ca15e28a3 100644 --- a/src/Migrate/help/New-AzMigrateProject.md +++ b/src/Migrate/help/New-AzMigrateProject.md @@ -52,7 +52,7 @@ Accept wildcard characters: False ``` ### -Location -Specifies the migrate project location. +Specifies the VMware machine name. ```yaml Type: System.String diff --git a/src/Migrate/readme.md b/src/Migrate/readme.md index 037bc7e1cc7a..7b28836f2a0b 100644 --- a/src/Migrate/readme.md +++ b/src/Migrate/readme.md @@ -47,6 +47,7 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml +skip-semantics-validation: true require: - $(this-folder)/../readme.azure.noprofile.md input-file: diff --git a/src/Migrate/run-module.ps1 b/src/Migrate/run-module.ps1 index 82a27029aff4..4f0c3747f6ce 100644 --- a/src/Migrate/run-module.ps1 +++ b/src/Migrate/run-module.ps1 @@ -24,6 +24,8 @@ if(-not $Isolated) { $isAzure = $true if($isAzure) { . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts + # Load the latest version of Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version } $localModulesPath = Join-Path $PSScriptRoot 'generated\modules' diff --git a/src/Migrate/test-module.ps1 b/src/Migrate/test-module.ps1 index 0501cf78e297..2d39d7c2994b 100644 --- a/src/Migrate/test-module.ps1 +++ b/src/Migrate/test-module.ps1 @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback) +param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule) $ErrorActionPreference = 'Stop' if(-not $Isolated) { @@ -24,10 +24,12 @@ if(-not $Isolated) { $ProgressPreference = 'SilentlyContinue' $baseName = $PSScriptRoot.BaseName $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule . ("$PSScriptRoot\test\utils.ps1") if ($requireResourceModule) { + # Load the latest Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') Import-Module -Name $resourceModulePSD.FullName } From eef8f924a1e86a24471cd9537b7e69fa63e06ccd Mon Sep 17 00:00:00 2001 From: Xiaogang Date: Wed, 19 May 2021 13:56:16 +0800 Subject: [PATCH 2/2] Update Changelog.md --- src/Migrate/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Migrate/Changelog.md b/src/Migrate/Changelog.md index 8857728dc2e5..4004863d24ab 100644 --- a/src/Migrate/Changelog.md +++ b/src/Migrate/Changelog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Fixed an issue in Initialize-AzMigrateReplicationInfrastructure.ps1 ## Version 1.0.1 * Nullref Bug fixed in get discovered server and initialize replication infrastructure commandlets.