Model/POSTNodesQemuAgentExecRB.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 InputData No description available. .PARAMETER Node No description available. .PARAMETER Command No description available. .PARAMETER Vmid No description available. .OUTPUTS POSTNodesQemuAgentExecRB<PSCustomObject> #> function Initialize-PVEPOSTNodesQemuAgentExecRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${InputData}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Node}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Command}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Vmid} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPOSTNodesQemuAgentExecRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$InputData -and $InputData.length -gt 65536) { throw "invalid value for 'InputData', the character length must be smaller than or equal to 65536." } if ($Vmid -and $Vmid -gt 999999999) { throw "invalid value for 'Vmid', must be smaller than or equal to 999999999." } if ($Vmid -and $Vmid -lt 100) { throw "invalid value for 'Vmid', must be greater than or equal to 100." } $DisplayNameMapping =@{ "InputData"="input-data"; "Node"="node"; "Command"="command"; "Vmid"="vmid" } $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 POSTNodesQemuAgentExecRB<PSCustomObject> .DESCRIPTION Convert from JSON to POSTNodesQemuAgentExecRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS POSTNodesQemuAgentExecRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPOSTNodesQemuAgentExecRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPOSTNodesQemuAgentExecRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPOSTNodesQemuAgentExecRB $AllProperties = ("input-data", "node", "command", "vmid") 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 "input-data"))) { #optional property not found $InputData = $null } else { $InputData = $JsonParameters.PSobject.Properties["input-data"].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 "command"))) { #optional property not found $Command = $null } else { $Command = $JsonParameters.PSobject.Properties["command"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "vmid"))) { #optional property not found $Vmid = $null } else { $Vmid = $JsonParameters.PSobject.Properties["vmid"].value } $PSO = [PSCustomObject]@{ "input-data" = ${InputData} "node" = ${Node} "command" = ${Command} "vmid" = ${Vmid} } return $PSO } } |