Model/GETNodesFirewallLogRB.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 Limit
No description available.
.PARAMETER Node
No description available.
.PARAMETER Start
No description available.
.PARAMETER VarUntil
No description available.
.PARAMETER Since
No description available.
.OUTPUTS

GETNodesFirewallLogRB<PSCustomObject>
#>


function Initialize-PVEGETNodesFirewallLogRB {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Limit},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Node},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Start},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${VarUntil},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Since}
    )

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


         $DisplayNameMapping =@{
            "Limit"="limit"; "Node"="node"; "Start"="start"; "VarUntil"="until"; "Since"="since"
        }
        
         $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 GETNodesFirewallLogRB<PSCustomObject>

.DESCRIPTION

Convert from JSON to GETNodesFirewallLogRB<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

GETNodesFirewallLogRB<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in PVEGETNodesFirewallLogRB
        $AllProperties = ("limit", "node", "start", "until", "since")
        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 "limit"))) { #optional property not found
            $Limit = $null
        } else {
            $Limit = $JsonParameters.PSobject.Properties["limit"].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 "start"))) { #optional property not found
            $Start = $null
        } else {
            $Start = $JsonParameters.PSobject.Properties["start"].value
        }

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

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

        $PSO = [PSCustomObject]@{
            "limit" = ${Limit}
            "node" = ${Node}
            "start" = ${Start}
            "until" = ${VarUntil}
            "since" = ${Since}
        }

        return $PSO
    }

}