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