Model/GETNodesQemuConfigRB.ps1
# # Proxmox VE # Generated module to access all Proxmox VE Api Endpoints # Version: 0.6 # Contact: amna.wolf@gmail.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Snapshot No description available. .PARAMETER Current No description available. .OUTPUTS GETNodesQemuConfigRB<PSCustomObject> #> function Initialize-PVEGETNodesQemuConfigRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Snapshot}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Current} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEGETNodesQemuConfigRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Snapshot -and $Snapshot.length -gt 40) { throw "invalid value for 'Snapshot', the character length must be smaller than or equal to 40." } $DisplayNameMapping =@{ "Snapshot"="snapshot"; "Current"="current" } $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 GETNodesQemuConfigRB<PSCustomObject> .DESCRIPTION Convert from JSON to GETNodesQemuConfigRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS GETNodesQemuConfigRB<PSCustomObject> #> function ConvertFrom-PVEJsonToGETNodesQemuConfigRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEGETNodesQemuConfigRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEGETNodesQemuConfigRB $AllProperties = ("snapshot", "current") 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 "snapshot"))) { #optional property not found $Snapshot = $null } else { $Snapshot = $JsonParameters.PSobject.Properties["snapshot"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "current"))) { #optional property not found $Current = $null } else { $Current = $JsonParameters.PSobject.Properties["current"].value } $PSO = [PSCustomObject]@{ "snapshot" = ${Snapshot} "current" = ${Current} } return $PSO } } |