Model/GETNodesConfigRB.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 Property No description available. .PARAMETER Node No description available. .OUTPUTS GETNodesConfigRB<PSCustomObject> #> function Initialize-PVEGETNodesConfigRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("acme", "acmedomain0", "acmedomain1", "acmedomain2", "acmedomain3", "acmedomain4", "acmedomain5", "description", "startall-onboot-delay", "wakeonlan")] [String] ${Property}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Node} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEGETNodesConfigRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Property"="property"; "Node"="node" } $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 GETNodesConfigRB<PSCustomObject> .DESCRIPTION Convert from JSON to GETNodesConfigRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS GETNodesConfigRB<PSCustomObject> #> function ConvertFrom-PVEJsonToGETNodesConfigRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEGETNodesConfigRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEGETNodesConfigRB $AllProperties = ("property", "node") 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 "property"))) { #optional property not found $Property = $null } else { $Property = $JsonParameters.PSobject.Properties["property"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "node"))) { #optional property not found $Node = $null } else { $Node = $JsonParameters.PSobject.Properties["node"].value } $PSO = [PSCustomObject]@{ "property" = ${Property} "node" = ${Node} } return $PSO } } |