Model/NodesDisksLvmChildrenInner.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 Children The underlying physical volumes .PARAMETER Free The free bytes in the volume group .PARAMETER Leaf No description available. .PARAMETER Name The name of the volume group .PARAMETER Size The size of the volume group in bytes .OUTPUTS NodesDisksLvmChildrenInner<PSCustomObject> #> function Initialize-PVENodesDisksLvmChildrenInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Children}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Free}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Leaf}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Size} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesDisksLvmChildrenInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Children"="children"; "Free"="free"; "Leaf"="leaf"; "Name"="name"; "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 NodesDisksLvmChildrenInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesDisksLvmChildrenInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesDisksLvmChildrenInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesDisksLvmChildrenInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesDisksLvmChildrenInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesDisksLvmChildrenInner $AllProperties = ("children", "free", "leaf", "name", "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 "children"))) { #optional property not found $Children = $null } else { $Children = $JsonParameters.PSobject.Properties["children"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "free"))) { #optional property not found $Free = $null } else { $Free = $JsonParameters.PSobject.Properties["free"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "leaf"))) { #optional property not found $Leaf = $null } else { $Leaf = $JsonParameters.PSobject.Properties["leaf"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "size"))) { #optional property not found $Size = $null } else { $Size = $JsonParameters.PSobject.Properties["size"].value } $PSO = [PSCustomObject]@{ "children" = ${Children} "free" = ${Free} "leaf" = ${Leaf} "name" = ${Name} "size" = ${Size} } return $PSO } } |