Model/NodesQemuMigrateLocalDisksInner.ps1
# # Proxmox VE # Generated module to access all Proxmox VE Api Endpoints # Version: 0.5 # Contact: amna.wolf@gmail.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Cdrom True if the disk is a cdrom. .PARAMETER IsUnused True if the disk is unused. .PARAMETER Size The size of the disk in bytes. .PARAMETER Volid The volid of the disk. .OUTPUTS NodesQemuMigrateLocalDisksInner<PSCustomObject> #> function Initialize-PVENodesQemuMigrateLocalDisksInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Cdrom}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsUnused}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Size}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Volid} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesQemuMigrateLocalDisksInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Cdrom"="cdrom"; "IsUnused"="is_unused"; "Size"="size"; "Volid"="volid" } $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 NodesQemuMigrateLocalDisksInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesQemuMigrateLocalDisksInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesQemuMigrateLocalDisksInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesQemuMigrateLocalDisksInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesQemuMigrateLocalDisksInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesQemuMigrateLocalDisksInner $AllProperties = ("cdrom", "is_unused", "size", "volid") 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 "cdrom"))) { #optional property not found $Cdrom = $null } else { $Cdrom = $JsonParameters.PSobject.Properties["cdrom"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "is_unused"))) { #optional property not found $IsUnused = $null } else { $IsUnused = $JsonParameters.PSobject.Properties["is_unused"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "size"))) { #optional property not found $Size = $null } else { $Size = $JsonParameters.PSobject.Properties["size"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "volid"))) { #optional property not found $Volid = $null } else { $Volid = $JsonParameters.PSobject.Properties["volid"].value } $PSO = [PSCustomObject]@{ "cdrom" = ${Cdrom} "is_unused" = ${IsUnused} "size" = ${Size} "volid" = ${Volid} } return $PSO } } |