Model/NodesQemuPendingInner.ps1
# # Proxmox VE Module 1.0 # Generated OpenApiDescription to render Modules via OpenapiGenerator # Version: 0.1 # Contact: # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Pending No description available. .PARAMETER Value No description available. .PARAMETER Key No description available. .PARAMETER Delete No description available. .OUTPUTS NodesQemuPendingInner<PSCustomObject> #> function Initialize-PVENodesQemuPendingInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Pending}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Value}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Key}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Delete} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesQemuPendingInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($Delete -and $Delete -gt 2) { throw "invalid value for 'Delete', must be smaller than or equal to 2." } $DisplayNameMapping =@{ "Pending"="pending"; "Value"="value"; "Key"="key"; "Delete"="delete" } $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 NodesQemuPendingInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesQemuPendingInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesQemuPendingInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesQemuPendingInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesQemuPendingInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesQemuPendingInner $AllProperties = ("pending", "value", "key", "delete") 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 "pending"))) { #optional property not found $Pending = $null } else { $Pending = $JsonParameters.PSobject.Properties["pending"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "value"))) { #optional property not found $Value = $null } else { $Value = $JsonParameters.PSobject.Properties["value"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "key"))) { #optional property not found $Key = $null } else { $Key = $JsonParameters.PSobject.Properties["key"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "delete"))) { #optional property not found $Delete = $null } else { $Delete = $JsonParameters.PSobject.Properties["delete"].value } $PSO = [PSCustomObject]@{ "pending" = ${Pending} "value" = ${Value} "key" = ${Key} "delete" = ${Delete} } return $PSO } } |