Model/NodesStorageStatus.ps1
|
# # Proxmox PowerShell VE # Generated module to access all Proxmox VE Api Endpoints. This module has been generated from the proxmox api description v. 9.1.1 # Version: 9.1.1 # Contact: mail@timo-wolf.de # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Total No description available. .PARAMETER Avail No description available. .PARAMETER Type No description available. .PARAMETER Active No description available. .PARAMETER Content No description available. .PARAMETER Used No description available. .PARAMETER Enabled No description available. .PARAMETER Shared No description available. .OUTPUTS NodesStorageStatus<PSCustomObject> #> function Initialize-PVENodesStorageStatus { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Total}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Avail}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Active}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Content}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Used}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Enabled}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Shared} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesStorageStatus' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Total"="total"; "Avail"="avail"; "Type"="type"; "Active"="active"; "Content"="content"; "Used"="used"; "Enabled"="enabled"; "Shared"="shared" } $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 NodesStorageStatus<PSCustomObject> .DESCRIPTION Convert from JSON to NodesStorageStatus<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesStorageStatus<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesStorageStatus { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesStorageStatus' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesStorageStatus $AllProperties = ("total", "avail", "type", "active", "content", "used", "enabled", "shared") 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 "total"))) { #optional property not found $Total = $null } else { $Total = $JsonParameters.PSobject.Properties["total"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "avail"))) { #optional property not found $Avail = $null } else { $Avail = $JsonParameters.PSobject.Properties["avail"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found $Type = $null } else { $Type = $JsonParameters.PSobject.Properties["type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "active"))) { #optional property not found $Active = $null } else { $Active = $JsonParameters.PSobject.Properties["active"].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 "used"))) { #optional property not found $Used = $null } else { $Used = $JsonParameters.PSobject.Properties["used"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "enabled"))) { #optional property not found $Enabled = $null } else { $Enabled = $JsonParameters.PSobject.Properties["enabled"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "shared"))) { #optional property not found $Shared = $null } else { $Shared = $JsonParameters.PSobject.Properties["shared"].value } $PSO = [PSCustomObject]@{ "total" = ${Total} "avail" = ${Avail} "type" = ${Type} "active" = ${Active} "content" = ${Content} "used" = ${Used} "enabled" = ${Enabled} "shared" = ${Shared} } return $PSO } } |