Model/PUTNodesQemuConfigRB.ps1

#
# Proxmox VE
# Generated module to access all Proxmox VE Api Endpoints
# Version: 0.3
# Contact: amna.wolf@gmail.com
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER Ivshmem
No description available.
.PARAMETER NetN
No description available.
.PARAMETER Vcpus
No description available.
.PARAMETER Ostype
No description available.
.PARAMETER UnusedN
No description available.
.PARAMETER Rng0
No description available.
.PARAMETER AmdSev
No description available.
.PARAMETER Autostart
No description available.
.PARAMETER Acpi
No description available.
.PARAMETER Revert
No description available.
.PARAMETER Boot
No description available.
.PARAMETER ScsiN
No description available.
.PARAMETER Agent
No description available.
.PARAMETER IpconfigN
No description available.
.PARAMETER VarArgs
No description available.
.PARAMETER MigrateSpeed
No description available.
.PARAMETER Startup
No description available.
.PARAMETER Vmstatestorage
No description available.
.PARAMETER Keyboard
No description available.
.PARAMETER Memory
No description available.
.PARAMETER Tpmstate0
No description available.
.PARAMETER Description
No description available.
.PARAMETER SpiceEnhancements
No description available.
.PARAMETER Freeze
No description available.
.PARAMETER Reboot
No description available.
.PARAMETER Smbios1
No description available.
.PARAMETER Cipassword
No description available.
.PARAMETER Bootdisk
No description available.
.PARAMETER Citype
No description available.
.PARAMETER Smp
No description available.
.PARAMETER Hookscript
No description available.
.PARAMETER Hotplug
No description available.
.PARAMETER Balloon
No description available.
.PARAMETER Tags
No description available.
.PARAMETER ParallelN
No description available.
.PARAMETER Sshkeys
No description available.
.PARAMETER Efidisk0
No description available.
.PARAMETER Arch
No description available.
.PARAMETER Delete
No description available.
.PARAMETER IdeN
No description available.
.PARAMETER VirtioN
No description available.
.PARAMETER Vga
No description available.
.PARAMETER Tdf
No description available.
.PARAMETER Name
No description available.
.PARAMETER Watchdog
No description available.
.PARAMETER MigrateDowntime
No description available.
.PARAMETER Vmgenid
No description available.
.PARAMETER Hugepages
No description available.
.PARAMETER SerialN
No description available.
.PARAMETER Cpuunits
No description available.
.PARAMETER Shares
No description available.
.PARAMETER Cpulimit
No description available.
.PARAMETER Cpu
No description available.
.PARAMETER Affinity
No description available.
.PARAMETER Onboot
No description available.
.PARAMETER Cicustom
No description available.
.PARAMETER Sockets
No description available.
.PARAMETER Node
No description available.
.PARAMETER Ciuser
No description available.
.PARAMETER Skiplock
No description available.
.PARAMETER Protection
No description available.
.PARAMETER Digest
No description available.
.PARAMETER Lock
No description available.
.PARAMETER Numa
No description available.
.PARAMETER Cores
No description available.
.PARAMETER HostpciN
No description available.
.PARAMETER Cdrom
No description available.
.PARAMETER SataN
No description available.
.PARAMETER Vmid
No description available.
.PARAMETER Tablet
No description available.
.PARAMETER Bios
No description available.
.PARAMETER Localtime
No description available.
.PARAMETER Template
No description available.
.PARAMETER Nameserver
No description available.
.PARAMETER Kvm
No description available.
.PARAMETER Force
No description available.
.PARAMETER UsbN
No description available.
.PARAMETER Startdate
No description available.
.PARAMETER Scsihw
No description available.
.PARAMETER Ciupgrade
No description available.
.PARAMETER Keephugepages
No description available.
.PARAMETER Audio0
No description available.
.PARAMETER NumaN
No description available.
.PARAMETER Searchdomain
No description available.
.PARAMETER Machine
No description available.
.OUTPUTS

PUTNodesQemuConfigRB<PSCustomObject>
#>


function Initialize-PVEPUTNodesQemuConfigRB {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Ivshmem},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${NetN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Vcpus},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("other", "wxp", "w2k", "w2k3", "w2k8", "wvista", "win7", "win8", "win10", "win11", "l24", "l26", "solaris")]
        [String]
        ${Ostype},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${UnusedN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Rng0},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AmdSev},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Autostart},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Acpi},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Revert},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Boot},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ScsiN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Agent},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${IpconfigN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${VarArgs},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${MigrateSpeed},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Startup},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Vmstatestorage},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("de", "de-ch", "da", "en-gb", "en-us", "es", "fi", "fr", "fr-be", "fr-ca", "fr-ch", "hu", "is", "it", "ja", "lt", "mk", "nl", "no", "pl", "pt", "pt-br", "sv", "sl", "tr")]
        [String]
        ${Keyboard},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Memory},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Tpmstate0},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${SpiceEnhancements},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Freeze},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Reboot},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Smbios1},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Cipassword},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidatePattern("(ide|sata|scsi|virtio)\d+")]
        [String]
        ${Bootdisk},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("configdrive2", "nocloud", "opennebula")]
        [String]
        ${Citype},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Smp},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Hookscript},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Hotplug},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Balloon},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Tags},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidatePattern("/dev/parport\d+|/dev/usb/lp\d+")]
        [String]
        ${ParallelN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Sshkeys},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Efidisk0},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("x86_64", "aarch64")]
        [String]
        ${Arch},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Delete},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${IdeN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${VirtioN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Vga},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Tdf},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Name},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Watchdog},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Decimal]]
        ${MigrateDowntime},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidatePattern("(?:[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}|[01])")]
        [String]
        ${Vmgenid},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("any", "2", "1024")]
        [String]
        ${Hugepages},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidatePattern("(/dev/.+|socket)")]
        [String]
        ${SerialN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Cpuunits},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Shares},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Decimal]]
        ${Cpulimit},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Cpu},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Affinity},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Onboot},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Cicustom},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Sockets},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Node},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Ciuser},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Skiplock},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Protection},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Digest},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("backup", "clone", "create", "migrate", "rollback", "snapshot", "snapshot-delete", "suspending", "suspended")]
        [String]
        ${Lock},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Numa},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Cores},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${HostpciN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Cdrom},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${SataN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Vmid},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Tablet},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("seabios", "ovmf")]
        [String]
        ${Bios},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Localtime},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Template},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Nameserver},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Kvm},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Force},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${UsbN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidatePattern("(now|\d{4}-\d{1,2}-\d{1,2}(T\d{1,2}:\d{1,2}:\d{1,2})?)")]
        [String]
        ${Startdate},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("lsi", "lsi53c810", "virtio-scsi-pci", "virtio-scsi-single", "megasas", "pvscsi")]
        [String]
        ${Scsihw},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Ciupgrade},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Keephugepages},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Audio0},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${NumaN},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Searchdomain},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Machine}
    )

    Process {
        'Creating PSCustomObject: ProxmoxPVE => PVEPUTNodesQemuConfigRB' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        if ($Vcpus -and $Vcpus -lt 1) {
          throw "invalid value for 'Vcpus', must be greater than or equal to 1."
        }

        if ($Autostart -and $Autostart -gt 1) {
          throw "invalid value for 'Autostart', must be smaller than or equal to 1."
        }

        if ($Autostart -and $Autostart -lt 0) {
          throw "invalid value for 'Autostart', must be greater than or equal to 0."
        }

        if ($Acpi -and $Acpi -gt 1) {
          throw "invalid value for 'Acpi', must be smaller than or equal to 1."
        }

        if ($Acpi -and $Acpi -lt 0) {
          throw "invalid value for 'Acpi', must be greater than or equal to 0."
        }

        if (!$Description -and $Description.length -gt 8192) {
            throw "invalid value for 'Description', the character length must be smaller than or equal to 8192."
        }

        if ($Freeze -and $Freeze -gt 1) {
          throw "invalid value for 'Freeze', must be smaller than or equal to 1."
        }

        if ($Freeze -and $Freeze -lt 0) {
          throw "invalid value for 'Freeze', must be greater than or equal to 0."
        }

        if ($Reboot -and $Reboot -gt 1) {
          throw "invalid value for 'Reboot', must be smaller than or equal to 1."
        }

        if ($Reboot -and $Reboot -lt 0) {
          throw "invalid value for 'Reboot', must be greater than or equal to 0."
        }

        if (!$Smbios1 -and $Smbios1.length -gt 512) {
            throw "invalid value for 'Smbios1', the character length must be smaller than or equal to 512."
        }

        if ($Smp -and $Smp -lt 1) {
          throw "invalid value for 'Smp', must be greater than or equal to 1."
        }

        if ($Tdf -and $Tdf -gt 1) {
          throw "invalid value for 'Tdf', must be smaller than or equal to 1."
        }

        if ($Tdf -and $Tdf -lt 0) {
          throw "invalid value for 'Tdf', must be greater than or equal to 0."
        }

        if ($Cpuunits -and $Cpuunits -gt 262144) {
          throw "invalid value for 'Cpuunits', must be smaller than or equal to 262144."
        }

        if ($Cpuunits -and $Cpuunits -lt 1) {
          throw "invalid value for 'Cpuunits', must be greater than or equal to 1."
        }

        if ($Shares -and $Shares -gt 50000) {
          throw "invalid value for 'Shares', must be smaller than or equal to 50000."
        }

        if ($Cpulimit -and $Cpulimit -gt 128) {
          throw "invalid value for 'Cpulimit', must be smaller than or equal to 128."
        }

        if ($Onboot -and $Onboot -gt 1) {
          throw "invalid value for 'Onboot', must be smaller than or equal to 1."
        }

        if ($Onboot -and $Onboot -lt 0) {
          throw "invalid value for 'Onboot', must be greater than or equal to 0."
        }

        if ($Sockets -and $Sockets -lt 1) {
          throw "invalid value for 'Sockets', must be greater than or equal to 1."
        }

        if ($Skiplock -and $Skiplock -gt 1) {
          throw "invalid value for 'Skiplock', must be smaller than or equal to 1."
        }

        if ($Skiplock -and $Skiplock -lt 0) {
          throw "invalid value for 'Skiplock', must be greater than or equal to 0."
        }

        if ($Protection -and $Protection -gt 1) {
          throw "invalid value for 'Protection', must be smaller than or equal to 1."
        }

        if ($Protection -and $Protection -lt 0) {
          throw "invalid value for 'Protection', must be greater than or equal to 0."
        }

        if (!$Digest -and $Digest.length -gt 40) {
            throw "invalid value for 'Digest', the character length must be smaller than or equal to 40."
        }

        if ($Numa -and $Numa -gt 1) {
          throw "invalid value for 'Numa', must be smaller than or equal to 1."
        }

        if ($Numa -and $Numa -lt 0) {
          throw "invalid value for 'Numa', must be greater than or equal to 0."
        }

        if ($Cores -and $Cores -lt 1) {
          throw "invalid value for 'Cores', must be greater than or equal to 1."
        }

        if ($Vmid -and $Vmid -gt 999999999) {
          throw "invalid value for 'Vmid', must be smaller than or equal to 999999999."
        }

        if ($Vmid -and $Vmid -lt 100) {
          throw "invalid value for 'Vmid', must be greater than or equal to 100."
        }

        if ($Tablet -and $Tablet -gt 1) {
          throw "invalid value for 'Tablet', must be smaller than or equal to 1."
        }

        if ($Tablet -and $Tablet -lt 0) {
          throw "invalid value for 'Tablet', must be greater than or equal to 0."
        }

        if ($Localtime -and $Localtime -gt 1) {
          throw "invalid value for 'Localtime', must be smaller than or equal to 1."
        }

        if ($Localtime -and $Localtime -lt 0) {
          throw "invalid value for 'Localtime', must be greater than or equal to 0."
        }

        if ($Template -and $Template -gt 1) {
          throw "invalid value for 'Template', must be smaller than or equal to 1."
        }

        if ($Template -and $Template -lt 0) {
          throw "invalid value for 'Template', must be greater than or equal to 0."
        }

        if ($Kvm -and $Kvm -gt 1) {
          throw "invalid value for 'Kvm', must be smaller than or equal to 1."
        }

        if ($Kvm -and $Kvm -lt 0) {
          throw "invalid value for 'Kvm', must be greater than or equal to 0."
        }

        if ($Force -and $Force -gt 1) {
          throw "invalid value for 'Force', must be smaller than or equal to 1."
        }

        if ($Force -and $Force -lt 0) {
          throw "invalid value for 'Force', must be greater than or equal to 0."
        }

        if ($Ciupgrade -and $Ciupgrade -gt 1) {
          throw "invalid value for 'Ciupgrade', must be smaller than or equal to 1."
        }

        if ($Ciupgrade -and $Ciupgrade -lt 0) {
          throw "invalid value for 'Ciupgrade', must be greater than or equal to 0."
        }

        if ($Keephugepages -and $Keephugepages -gt 1) {
          throw "invalid value for 'Keephugepages', must be smaller than or equal to 1."
        }

        if ($Keephugepages -and $Keephugepages -lt 0) {
          throw "invalid value for 'Keephugepages', must be greater than or equal to 0."
        }


         $DisplayNameMapping =@{
            "Ivshmem"="ivshmem"; "NetN"="net[n]"; "Vcpus"="vcpus"; "Ostype"="ostype"; "UnusedN"="unused[n]"; "Rng0"="rng0"; "AmdSev"="amd-sev"; "Autostart"="autostart"; "Acpi"="acpi"; "Revert"="revert"; "Boot"="boot"; "ScsiN"="scsi[n]"; "Agent"="agent"; "IpconfigN"="ipconfig[n]"; "VarArgs"="args"; "MigrateSpeed"="migrate_speed"; "Startup"="startup"; "Vmstatestorage"="vmstatestorage"; "Keyboard"="keyboard"; "Memory"="memory"; "Tpmstate0"="tpmstate0"; "Description"="description"; "SpiceEnhancements"="spice_enhancements"; "Freeze"="freeze"; "Reboot"="reboot"; "Smbios1"="smbios1"; "Cipassword"="cipassword"; "Bootdisk"="bootdisk"; "Citype"="citype"; "Smp"="smp"; "Hookscript"="hookscript"; "Hotplug"="hotplug"; "Balloon"="balloon"; "Tags"="tags"; "ParallelN"="parallel[n]"; "Sshkeys"="sshkeys"; "Efidisk0"="efidisk0"; "Arch"="arch"; "Delete"="delete"; "IdeN"="ide[n]"; "VirtioN"="virtio[n]"; "Vga"="vga"; "Tdf"="tdf"; "Name"="name"; "Watchdog"="watchdog"; "MigrateDowntime"="migrate_downtime"; "Vmgenid"="vmgenid"; "Hugepages"="hugepages"; "SerialN"="serial[n]"; "Cpuunits"="cpuunits"; "Shares"="shares"; "Cpulimit"="cpulimit"; "Cpu"="cpu"; "Affinity"="affinity"; "Onboot"="onboot"; "Cicustom"="cicustom"; "Sockets"="sockets"; "Node"="node"; "Ciuser"="ciuser"; "Skiplock"="skiplock"; "Protection"="protection"; "Digest"="digest"; "Lock"="lock"; "Numa"="numa"; "Cores"="cores"; "HostpciN"="hostpci[n]"; "Cdrom"="cdrom"; "SataN"="sata[n]"; "Vmid"="vmid"; "Tablet"="tablet"; "Bios"="bios"; "Localtime"="localtime"; "Template"="template"; "Nameserver"="nameserver"; "Kvm"="kvm"; "Force"="force"; "UsbN"="usb[n]"; "Startdate"="startdate"; "Scsihw"="scsihw"; "Ciupgrade"="ciupgrade"; "Keephugepages"="keephugepages"; "Audio0"="audio0"; "NumaN"="numa[n]"; "Searchdomain"="searchdomain"; "Machine"="machine"
        }
        
         $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 PUTNodesQemuConfigRB<PSCustomObject>

.DESCRIPTION

Convert from JSON to PUTNodesQemuConfigRB<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

PUTNodesQemuConfigRB<PSCustomObject>
#>

function ConvertFrom-PVEJsonToPUTNodesQemuConfigRB {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPUTNodesQemuConfigRB' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in PVEPUTNodesQemuConfigRB
        $AllProperties = ("ivshmem", "net[n]", "vcpus", "ostype", "unused[n]", "rng0", "amd-sev", "autostart", "acpi", "revert", "boot", "scsi[n]", "agent", "ipconfig[n]", "args", "migrate_speed", "startup", "vmstatestorage", "keyboard", "memory", "tpmstate0", "description", "spice_enhancements", "freeze", "reboot", "smbios1", "cipassword", "bootdisk", "citype", "smp", "hookscript", "hotplug", "balloon", "tags", "parallel[n]", "sshkeys", "efidisk0", "arch", "delete", "ide[n]", "virtio[n]", "vga", "tdf", "name", "watchdog", "migrate_downtime", "vmgenid", "hugepages", "serial[n]", "cpuunits", "shares", "cpulimit", "cpu", "affinity", "onboot", "cicustom", "sockets", "node", "ciuser", "skiplock", "protection", "digest", "lock", "numa", "cores", "hostpci[n]", "cdrom", "sata[n]", "vmid", "tablet", "bios", "localtime", "template", "nameserver", "kvm", "force", "usb[n]", "startdate", "scsihw", "ciupgrade", "keephugepages", "audio0", "numa[n]", "searchdomain", "machine")
        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 "ivshmem"))) { #optional property not found
            $Ivshmem = $null
        } else {
            $Ivshmem = $JsonParameters.PSobject.Properties["ivshmem"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "net[n]"))) { #optional property not found
            $NetN = $null
        } else {
            $NetN = $JsonParameters.PSobject.Properties["net[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "vcpus"))) { #optional property not found
            $Vcpus = $null
        } else {
            $Vcpus = $JsonParameters.PSobject.Properties["vcpus"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "ostype"))) { #optional property not found
            $Ostype = $null
        } else {
            $Ostype = $JsonParameters.PSobject.Properties["ostype"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "unused[n]"))) { #optional property not found
            $UnusedN = $null
        } else {
            $UnusedN = $JsonParameters.PSobject.Properties["unused[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "rng0"))) { #optional property not found
            $Rng0 = $null
        } else {
            $Rng0 = $JsonParameters.PSobject.Properties["rng0"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "amd-sev"))) { #optional property not found
            $AmdSev = $null
        } else {
            $AmdSev = $JsonParameters.PSobject.Properties["amd-sev"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "autostart"))) { #optional property not found
            $Autostart = $null
        } else {
            $Autostart = $JsonParameters.PSobject.Properties["autostart"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "acpi"))) { #optional property not found
            $Acpi = $null
        } else {
            $Acpi = $JsonParameters.PSobject.Properties["acpi"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "revert"))) { #optional property not found
            $Revert = $null
        } else {
            $Revert = $JsonParameters.PSobject.Properties["revert"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "boot"))) { #optional property not found
            $Boot = $null
        } else {
            $Boot = $JsonParameters.PSobject.Properties["boot"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "scsi[n]"))) { #optional property not found
            $ScsiN = $null
        } else {
            $ScsiN = $JsonParameters.PSobject.Properties["scsi[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "agent"))) { #optional property not found
            $Agent = $null
        } else {
            $Agent = $JsonParameters.PSobject.Properties["agent"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "ipconfig[n]"))) { #optional property not found
            $IpconfigN = $null
        } else {
            $IpconfigN = $JsonParameters.PSobject.Properties["ipconfig[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "args"))) { #optional property not found
            $VarArgs = $null
        } else {
            $VarArgs = $JsonParameters.PSobject.Properties["args"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "migrate_speed"))) { #optional property not found
            $MigrateSpeed = $null
        } else {
            $MigrateSpeed = $JsonParameters.PSobject.Properties["migrate_speed"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "startup"))) { #optional property not found
            $Startup = $null
        } else {
            $Startup = $JsonParameters.PSobject.Properties["startup"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "vmstatestorage"))) { #optional property not found
            $Vmstatestorage = $null
        } else {
            $Vmstatestorage = $JsonParameters.PSobject.Properties["vmstatestorage"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "keyboard"))) { #optional property not found
            $Keyboard = $null
        } else {
            $Keyboard = $JsonParameters.PSobject.Properties["keyboard"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "memory"))) { #optional property not found
            $Memory = $null
        } else {
            $Memory = $JsonParameters.PSobject.Properties["memory"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "tpmstate0"))) { #optional property not found
            $Tpmstate0 = $null
        } else {
            $Tpmstate0 = $JsonParameters.PSobject.Properties["tpmstate0"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "description"))) { #optional property not found
            $Description = $null
        } else {
            $Description = $JsonParameters.PSobject.Properties["description"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "spice_enhancements"))) { #optional property not found
            $SpiceEnhancements = $null
        } else {
            $SpiceEnhancements = $JsonParameters.PSobject.Properties["spice_enhancements"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "freeze"))) { #optional property not found
            $Freeze = $null
        } else {
            $Freeze = $JsonParameters.PSobject.Properties["freeze"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "reboot"))) { #optional property not found
            $Reboot = $null
        } else {
            $Reboot = $JsonParameters.PSobject.Properties["reboot"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "smbios1"))) { #optional property not found
            $Smbios1 = $null
        } else {
            $Smbios1 = $JsonParameters.PSobject.Properties["smbios1"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "cipassword"))) { #optional property not found
            $Cipassword = $null
        } else {
            $Cipassword = $JsonParameters.PSobject.Properties["cipassword"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "bootdisk"))) { #optional property not found
            $Bootdisk = $null
        } else {
            $Bootdisk = $JsonParameters.PSobject.Properties["bootdisk"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "citype"))) { #optional property not found
            $Citype = $null
        } else {
            $Citype = $JsonParameters.PSobject.Properties["citype"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "smp"))) { #optional property not found
            $Smp = $null
        } else {
            $Smp = $JsonParameters.PSobject.Properties["smp"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "hookscript"))) { #optional property not found
            $Hookscript = $null
        } else {
            $Hookscript = $JsonParameters.PSobject.Properties["hookscript"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "hotplug"))) { #optional property not found
            $Hotplug = $null
        } else {
            $Hotplug = $JsonParameters.PSobject.Properties["hotplug"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "balloon"))) { #optional property not found
            $Balloon = $null
        } else {
            $Balloon = $JsonParameters.PSobject.Properties["balloon"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "tags"))) { #optional property not found
            $Tags = $null
        } else {
            $Tags = $JsonParameters.PSobject.Properties["tags"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "parallel[n]"))) { #optional property not found
            $ParallelN = $null
        } else {
            $ParallelN = $JsonParameters.PSobject.Properties["parallel[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "sshkeys"))) { #optional property not found
            $Sshkeys = $null
        } else {
            $Sshkeys = $JsonParameters.PSobject.Properties["sshkeys"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "efidisk0"))) { #optional property not found
            $Efidisk0 = $null
        } else {
            $Efidisk0 = $JsonParameters.PSobject.Properties["efidisk0"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "arch"))) { #optional property not found
            $Arch = $null
        } else {
            $Arch = $JsonParameters.PSobject.Properties["arch"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "delete"))) { #optional property not found
            $Delete = $null
        } else {
            $Delete = $JsonParameters.PSobject.Properties["delete"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "ide[n]"))) { #optional property not found
            $IdeN = $null
        } else {
            $IdeN = $JsonParameters.PSobject.Properties["ide[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "virtio[n]"))) { #optional property not found
            $VirtioN = $null
        } else {
            $VirtioN = $JsonParameters.PSobject.Properties["virtio[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "vga"))) { #optional property not found
            $Vga = $null
        } else {
            $Vga = $JsonParameters.PSobject.Properties["vga"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "tdf"))) { #optional property not found
            $Tdf = $null
        } else {
            $Tdf = $JsonParameters.PSobject.Properties["tdf"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found
            $Name = $null
        } else {
            $Name = $JsonParameters.PSobject.Properties["name"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "watchdog"))) { #optional property not found
            $Watchdog = $null
        } else {
            $Watchdog = $JsonParameters.PSobject.Properties["watchdog"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "migrate_downtime"))) { #optional property not found
            $MigrateDowntime = $null
        } else {
            $MigrateDowntime = $JsonParameters.PSobject.Properties["migrate_downtime"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "vmgenid"))) { #optional property not found
            $Vmgenid = $null
        } else {
            $Vmgenid = $JsonParameters.PSobject.Properties["vmgenid"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "hugepages"))) { #optional property not found
            $Hugepages = $null
        } else {
            $Hugepages = $JsonParameters.PSobject.Properties["hugepages"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "serial[n]"))) { #optional property not found
            $SerialN = $null
        } else {
            $SerialN = $JsonParameters.PSobject.Properties["serial[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "cpuunits"))) { #optional property not found
            $Cpuunits = $null
        } else {
            $Cpuunits = $JsonParameters.PSobject.Properties["cpuunits"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "shares"))) { #optional property not found
            $Shares = $null
        } else {
            $Shares = $JsonParameters.PSobject.Properties["shares"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "cpulimit"))) { #optional property not found
            $Cpulimit = $null
        } else {
            $Cpulimit = $JsonParameters.PSobject.Properties["cpulimit"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "cpu"))) { #optional property not found
            $Cpu = $null
        } else {
            $Cpu = $JsonParameters.PSobject.Properties["cpu"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "affinity"))) { #optional property not found
            $Affinity = $null
        } else {
            $Affinity = $JsonParameters.PSobject.Properties["affinity"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "onboot"))) { #optional property not found
            $Onboot = $null
        } else {
            $Onboot = $JsonParameters.PSobject.Properties["onboot"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "cicustom"))) { #optional property not found
            $Cicustom = $null
        } else {
            $Cicustom = $JsonParameters.PSobject.Properties["cicustom"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "sockets"))) { #optional property not found
            $Sockets = $null
        } else {
            $Sockets = $JsonParameters.PSobject.Properties["sockets"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "node"))) { #optional property not found
            $Node = $null
        } else {
            $Node = $JsonParameters.PSobject.Properties["node"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "ciuser"))) { #optional property not found
            $Ciuser = $null
        } else {
            $Ciuser = $JsonParameters.PSobject.Properties["ciuser"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "skiplock"))) { #optional property not found
            $Skiplock = $null
        } else {
            $Skiplock = $JsonParameters.PSobject.Properties["skiplock"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "protection"))) { #optional property not found
            $Protection = $null
        } else {
            $Protection = $JsonParameters.PSobject.Properties["protection"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "digest"))) { #optional property not found
            $Digest = $null
        } else {
            $Digest = $JsonParameters.PSobject.Properties["digest"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "lock"))) { #optional property not found
            $Lock = $null
        } else {
            $Lock = $JsonParameters.PSobject.Properties["lock"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "numa"))) { #optional property not found
            $Numa = $null
        } else {
            $Numa = $JsonParameters.PSobject.Properties["numa"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "cores"))) { #optional property not found
            $Cores = $null
        } else {
            $Cores = $JsonParameters.PSobject.Properties["cores"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "hostpci[n]"))) { #optional property not found
            $HostpciN = $null
        } else {
            $HostpciN = $JsonParameters.PSobject.Properties["hostpci[n]"].value
        }

        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 "sata[n]"))) { #optional property not found
            $SataN = $null
        } else {
            $SataN = $JsonParameters.PSobject.Properties["sata[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "vmid"))) { #optional property not found
            $Vmid = $null
        } else {
            $Vmid = $JsonParameters.PSobject.Properties["vmid"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "tablet"))) { #optional property not found
            $Tablet = $null
        } else {
            $Tablet = $JsonParameters.PSobject.Properties["tablet"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "bios"))) { #optional property not found
            $Bios = $null
        } else {
            $Bios = $JsonParameters.PSobject.Properties["bios"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "localtime"))) { #optional property not found
            $Localtime = $null
        } else {
            $Localtime = $JsonParameters.PSobject.Properties["localtime"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "template"))) { #optional property not found
            $Template = $null
        } else {
            $Template = $JsonParameters.PSobject.Properties["template"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "nameserver"))) { #optional property not found
            $Nameserver = $null
        } else {
            $Nameserver = $JsonParameters.PSobject.Properties["nameserver"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "kvm"))) { #optional property not found
            $Kvm = $null
        } else {
            $Kvm = $JsonParameters.PSobject.Properties["kvm"].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 "usb[n]"))) { #optional property not found
            $UsbN = $null
        } else {
            $UsbN = $JsonParameters.PSobject.Properties["usb[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "startdate"))) { #optional property not found
            $Startdate = $null
        } else {
            $Startdate = $JsonParameters.PSobject.Properties["startdate"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "scsihw"))) { #optional property not found
            $Scsihw = $null
        } else {
            $Scsihw = $JsonParameters.PSobject.Properties["scsihw"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "ciupgrade"))) { #optional property not found
            $Ciupgrade = $null
        } else {
            $Ciupgrade = $JsonParameters.PSobject.Properties["ciupgrade"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "keephugepages"))) { #optional property not found
            $Keephugepages = $null
        } else {
            $Keephugepages = $JsonParameters.PSobject.Properties["keephugepages"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "audio0"))) { #optional property not found
            $Audio0 = $null
        } else {
            $Audio0 = $JsonParameters.PSobject.Properties["audio0"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "numa[n]"))) { #optional property not found
            $NumaN = $null
        } else {
            $NumaN = $JsonParameters.PSobject.Properties["numa[n]"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "searchdomain"))) { #optional property not found
            $Searchdomain = $null
        } else {
            $Searchdomain = $JsonParameters.PSobject.Properties["searchdomain"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "machine"))) { #optional property not found
            $Machine = $null
        } else {
            $Machine = $JsonParameters.PSobject.Properties["machine"].value
        }

        $PSO = [PSCustomObject]@{
            "ivshmem" = ${Ivshmem}
            "net[n]" = ${NetN}
            "vcpus" = ${Vcpus}
            "ostype" = ${Ostype}
            "unused[n]" = ${UnusedN}
            "rng0" = ${Rng0}
            "amd-sev" = ${AmdSev}
            "autostart" = ${Autostart}
            "acpi" = ${Acpi}
            "revert" = ${Revert}
            "boot" = ${Boot}
            "scsi[n]" = ${ScsiN}
            "agent" = ${Agent}
            "ipconfig[n]" = ${IpconfigN}
            "args" = ${VarArgs}
            "migrate_speed" = ${MigrateSpeed}
            "startup" = ${Startup}
            "vmstatestorage" = ${Vmstatestorage}
            "keyboard" = ${Keyboard}
            "memory" = ${Memory}
            "tpmstate0" = ${Tpmstate0}
            "description" = ${Description}
            "spice_enhancements" = ${SpiceEnhancements}
            "freeze" = ${Freeze}
            "reboot" = ${Reboot}
            "smbios1" = ${Smbios1}
            "cipassword" = ${Cipassword}
            "bootdisk" = ${Bootdisk}
            "citype" = ${Citype}
            "smp" = ${Smp}
            "hookscript" = ${Hookscript}
            "hotplug" = ${Hotplug}
            "balloon" = ${Balloon}
            "tags" = ${Tags}
            "parallel[n]" = ${ParallelN}
            "sshkeys" = ${Sshkeys}
            "efidisk0" = ${Efidisk0}
            "arch" = ${Arch}
            "delete" = ${Delete}
            "ide[n]" = ${IdeN}
            "virtio[n]" = ${VirtioN}
            "vga" = ${Vga}
            "tdf" = ${Tdf}
            "name" = ${Name}
            "watchdog" = ${Watchdog}
            "migrate_downtime" = ${MigrateDowntime}
            "vmgenid" = ${Vmgenid}
            "hugepages" = ${Hugepages}
            "serial[n]" = ${SerialN}
            "cpuunits" = ${Cpuunits}
            "shares" = ${Shares}
            "cpulimit" = ${Cpulimit}
            "cpu" = ${Cpu}
            "affinity" = ${Affinity}
            "onboot" = ${Onboot}
            "cicustom" = ${Cicustom}
            "sockets" = ${Sockets}
            "node" = ${Node}
            "ciuser" = ${Ciuser}
            "skiplock" = ${Skiplock}
            "protection" = ${Protection}
            "digest" = ${Digest}
            "lock" = ${Lock}
            "numa" = ${Numa}
            "cores" = ${Cores}
            "hostpci[n]" = ${HostpciN}
            "cdrom" = ${Cdrom}
            "sata[n]" = ${SataN}
            "vmid" = ${Vmid}
            "tablet" = ${Tablet}
            "bios" = ${Bios}
            "localtime" = ${Localtime}
            "template" = ${Template}
            "nameserver" = ${Nameserver}
            "kvm" = ${Kvm}
            "force" = ${Force}
            "usb[n]" = ${UsbN}
            "startdate" = ${Startdate}
            "scsihw" = ${Scsihw}
            "ciupgrade" = ${Ciupgrade}
            "keephugepages" = ${Keephugepages}
            "audio0" = ${Audio0}
            "numa[n]" = ${NumaN}
            "searchdomain" = ${Searchdomain}
            "machine" = ${Machine}
        }

        return $PSO
    }

}