Model/NodesStorageContentGETInner.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 Protected No description available. .PARAMETER Encrypted No description available. .PARAMETER Ctime No description available. .PARAMETER Size No description available. .PARAMETER Volid No description available. .PARAMETER Used No description available. .PARAMETER Notes No description available. .PARAMETER Verification No description available. .PARAMETER Vmid No description available. .PARAMETER Parent No description available. .PARAMETER Format No description available. .OUTPUTS NodesStorageContentGETInner<PSCustomObject> #> function Initialize-PVENodesStorageContentGETInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Protected}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Encrypted}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Ctime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Size}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Volid}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Used}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Notes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Verification}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Vmid}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Parent}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Format} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesStorageContentGETInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Protected"="protected"; "Encrypted"="encrypted"; "Ctime"="ctime"; "Size"="size"; "Volid"="volid"; "Used"="used"; "Notes"="notes"; "Verification"="verification"; "Vmid"="vmid"; "Parent"="parent"; "Format"="format" } $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 NodesStorageContentGETInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesStorageContentGETInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesStorageContentGETInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesStorageContentGETInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesStorageContentGETInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesStorageContentGETInner $AllProperties = ("protected", "encrypted", "ctime", "size", "volid", "used", "notes", "verification", "vmid", "parent", "format") 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 "protected"))) { #optional property not found $Protected = $null } else { $Protected = $JsonParameters.PSobject.Properties["protected"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "encrypted"))) { #optional property not found $Encrypted = $null } else { $Encrypted = $JsonParameters.PSobject.Properties["encrypted"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ctime"))) { #optional property not found $Ctime = $null } else { $Ctime = $JsonParameters.PSobject.Properties["ctime"].value } 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 "volid"))) { #optional property not found $Volid = $null } else { $Volid = $JsonParameters.PSobject.Properties["volid"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "used"))) { #optional property not found $Used = $null } else { $Used = $JsonParameters.PSobject.Properties["used"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "notes"))) { #optional property not found $Notes = $null } else { $Notes = $JsonParameters.PSobject.Properties["notes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "verification"))) { #optional property not found $Verification = $null } else { $Verification = $JsonParameters.PSobject.Properties["verification"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "vmid"))) { #optional property not found $Vmid = $null } else { $Vmid = $JsonParameters.PSobject.Properties["vmid"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "parent"))) { #optional property not found $Parent = $null } else { $Parent = $JsonParameters.PSobject.Properties["parent"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "format"))) { #optional property not found $Format = $null } else { $Format = $JsonParameters.PSobject.Properties["format"].value } $PSO = [PSCustomObject]@{ "protected" = ${Protected} "encrypted" = ${Encrypted} "ctime" = ${Ctime} "size" = ${Size} "volid" = ${Volid} "used" = ${Used} "notes" = ${Notes} "verification" = ${Verification} "vmid" = ${Vmid} "parent" = ${Parent} "format" = ${Format} } return $PSO } } |