Model/POSTNodesQemuAgentFilewriteRB.ps1
# # Proxmox PowerShell VE # Generated module to access all Proxmox VE Api Endpoints. This module has been generated from the proxmox api description v. 8.4.0 # Version: 8.4.0 # Contact: mail@timo-wolf.de # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Encode No description available. .PARAMETER Content No description available. .PARAMETER File No description available. .OUTPUTS POSTNodesQemuAgentFilewriteRB<PSCustomObject> #> function Initialize-PVEPOSTNodesQemuAgentFilewriteRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Encode}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Content}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${File} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPOSTNodesQemuAgentFilewriteRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Content -and $Content.length -gt 61440) { throw "invalid value for 'Content', the character length must be smaller than or equal to 61440." } $DisplayNameMapping =@{ "Encode"="encode"; "Content"="content"; "File"="file" } $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 POSTNodesQemuAgentFilewriteRB<PSCustomObject> .DESCRIPTION Convert from JSON to POSTNodesQemuAgentFilewriteRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS POSTNodesQemuAgentFilewriteRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPOSTNodesQemuAgentFilewriteRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPOSTNodesQemuAgentFilewriteRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPOSTNodesQemuAgentFilewriteRB $AllProperties = ("encode", "content", "file") 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 "encode"))) { #optional property not found $Encode = $null } else { $Encode = $JsonParameters.PSobject.Properties["encode"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "content"))) { #optional property not found $Content = $null } else { $Content = $JsonParameters.PSobject.Properties["content"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "file"))) { #optional property not found $File = $null } else { $File = $JsonParameters.PSobject.Properties["file"].value } $PSO = [PSCustomObject]@{ "encode" = ${Encode} "content" = ${Content} "file" = ${File} } return $PSO } } |