Model/NodesQueryurlmetadata.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 Size No description available. .PARAMETER Mimetype No description available. .PARAMETER Filename No description available. .OUTPUTS NodesQueryurlmetadata<PSCustomObject> #> function Initialize-PVENodesQueryurlmetadata { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Size}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Mimetype}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Filename} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesQueryurlmetadata' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Size"="size"; "Mimetype"="mimetype"; "Filename"="filename" } $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 NodesQueryurlmetadata<PSCustomObject> .DESCRIPTION Convert from JSON to NodesQueryurlmetadata<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesQueryurlmetadata<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesQueryurlmetadata { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesQueryurlmetadata' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesQueryurlmetadata $AllProperties = ("size", "mimetype", "filename") 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 "size"))) { #optional property not found $Size = $null } else { $Size = $JsonParameters.PSobject.Properties["size"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mimetype"))) { #optional property not found $Mimetype = $null } else { $Mimetype = $JsonParameters.PSobject.Properties["mimetype"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "filename"))) { #optional property not found $Filename = $null } else { $Filename = $JsonParameters.PSobject.Properties["filename"].value } $PSO = [PSCustomObject]@{ "size" = ${Size} "mimetype" = ${Mimetype} "filename" = ${Filename} } return $PSO } } |