Model/GETNodesJournalRB.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 Lastentries No description available. .PARAMETER Since No description available. .PARAMETER Node No description available. .PARAMETER Endcursor No description available. .PARAMETER VarUntil No description available. .PARAMETER Startcursor No description available. .OUTPUTS GETNodesJournalRB<PSCustomObject> #> function Initialize-PVEGETNodesJournalRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Lastentries}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Since}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Node}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Endcursor}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${VarUntil}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Startcursor} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEGETNodesJournalRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Lastentries"="lastentries"; "Since"="since"; "Node"="node"; "Endcursor"="endcursor"; "VarUntil"="until"; "Startcursor"="startcursor" } $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 GETNodesJournalRB<PSCustomObject> .DESCRIPTION Convert from JSON to GETNodesJournalRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS GETNodesJournalRB<PSCustomObject> #> function ConvertFrom-PVEJsonToGETNodesJournalRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEGETNodesJournalRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEGETNodesJournalRB $AllProperties = ("lastentries", "since", "node", "endcursor", "until", "startcursor") 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 "lastentries"))) { #optional property not found $Lastentries = $null } else { $Lastentries = $JsonParameters.PSobject.Properties["lastentries"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "since"))) { #optional property not found $Since = $null } else { $Since = $JsonParameters.PSobject.Properties["since"].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 "endcursor"))) { #optional property not found $Endcursor = $null } else { $Endcursor = $JsonParameters.PSobject.Properties["endcursor"].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 "startcursor"))) { #optional property not found $Startcursor = $null } else { $Startcursor = $JsonParameters.PSobject.Properties["startcursor"].value } $PSO = [PSCustomObject]@{ "lastentries" = ${Lastentries} "since" = ${Since} "node" = ${Node} "endcursor" = ${Endcursor} "until" = ${VarUntil} "startcursor" = ${Startcursor} } return $PSO } } |