Model/POSTNodesQemuMigrateRB.ps1
# # Proxmox PowerShell VE # Generated module to access all Proxmox VE Api Endpoints. This module has been generated from the proxmox api description v. 8.4.0 # Version: 8.4.0 # Contact: mail@timo-wolf.de # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER MigrationNetwork No description available. .PARAMETER WithLocalDisks No description available. .PARAMETER Target No description available. .PARAMETER Force No description available. .PARAMETER Targetstorage No description available. .PARAMETER Bwlimit No description available. .PARAMETER MigrationType No description available. .PARAMETER Online No description available. .OUTPUTS POSTNodesQemuMigrateRB<PSCustomObject> #> function Initialize-PVEPOSTNodesQemuMigrateRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${MigrationNetwork}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${WithLocalDisks}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Target}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Force}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Targetstorage}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Bwlimit}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("secure", "insecure")] [String] ${MigrationType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Online} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPOSTNodesQemuMigrateRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "MigrationNetwork"="migration_network"; "WithLocalDisks"="with-local-disks"; "Target"="target"; "Force"="force"; "Targetstorage"="targetstorage"; "Bwlimit"="bwlimit"; "MigrationType"="migration_type"; "Online"="online" } $OBJ = @{} foreach($parameter in $PSBoundParameters.Keys){ #If Specifield map the Display name back $OBJ.($DisplayNameMapping.($parameter)) = $PSBoundParameters.$parameter } $PSO = [PSCustomObject]$OBJ return $PSO } } <# .SYNOPSIS Convert from JSON to POSTNodesQemuMigrateRB<PSCustomObject> .DESCRIPTION Convert from JSON to POSTNodesQemuMigrateRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS POSTNodesQemuMigrateRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPOSTNodesQemuMigrateRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPOSTNodesQemuMigrateRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPOSTNodesQemuMigrateRB $AllProperties = ("migration_network", "with-local-disks", "target", "force", "targetstorage", "bwlimit", "migration_type", "online") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } if (!([bool]($JsonParameters.PSobject.Properties.name -match "migration_network"))) { #optional property not found $MigrationNetwork = $null } else { $MigrationNetwork = $JsonParameters.PSobject.Properties["migration_network"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "with-local-disks"))) { #optional property not found $WithLocalDisks = $null } else { $WithLocalDisks = $JsonParameters.PSobject.Properties["with-local-disks"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "target"))) { #optional property not found $Target = $null } else { $Target = $JsonParameters.PSobject.Properties["target"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "force"))) { #optional property not found $Force = $null } else { $Force = $JsonParameters.PSobject.Properties["force"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "targetstorage"))) { #optional property not found $Targetstorage = $null } else { $Targetstorage = $JsonParameters.PSobject.Properties["targetstorage"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "bwlimit"))) { #optional property not found $Bwlimit = $null } else { $Bwlimit = $JsonParameters.PSobject.Properties["bwlimit"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "migration_type"))) { #optional property not found $MigrationType = $null } else { $MigrationType = $JsonParameters.PSobject.Properties["migration_type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "online"))) { #optional property not found $Online = $null } else { $Online = $JsonParameters.PSobject.Properties["online"].value } $PSO = [PSCustomObject]@{ "migration_network" = ${MigrationNetwork} "with-local-disks" = ${WithLocalDisks} "target" = ${Target} "force" = ${Force} "targetstorage" = ${Targetstorage} "bwlimit" = ${Bwlimit} "migration_type" = ${MigrationType} "online" = ${Online} } return $PSO } } |