Model/PoolsGETInnerMembersInner.ps1
# # Proxmox VE # Generated module to access all Proxmox VE Api Endpoints # Version: 0.6 # Contact: amna.wolf@gmail.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Id No description available. .PARAMETER Node No description available. .PARAMETER Storage No description available. .PARAMETER Type No description available. .PARAMETER Vmid No description available. .OUTPUTS PoolsGETInnerMembersInner<PSCustomObject> #> function Initialize-PVEPoolsGETInnerMembersInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Node}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Storage}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("qemu", "lxc", "openvz", "storage")] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Vmid} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPoolsGETInnerMembersInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Id"="id"; "Node"="node"; "Storage"="storage"; "Type"="type"; "Vmid"="vmid" } $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 PoolsGETInnerMembersInner<PSCustomObject> .DESCRIPTION Convert from JSON to PoolsGETInnerMembersInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS PoolsGETInnerMembersInner<PSCustomObject> #> function ConvertFrom-PVEJsonToPoolsGETInnerMembersInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPoolsGETInnerMembersInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPoolsGETInnerMembersInner $AllProperties = ("id", "node", "storage", "type", "vmid") 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 "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "node"))) { #optional property not found $Node = $null } else { $Node = $JsonParameters.PSobject.Properties["node"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "storage"))) { #optional property not found $Storage = $null } else { $Storage = $JsonParameters.PSobject.Properties["storage"].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 "vmid"))) { #optional property not found $Vmid = $null } else { $Vmid = $JsonParameters.PSobject.Properties["vmid"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "node" = ${Node} "storage" = ${Storage} "type" = ${Type} "vmid" = ${Vmid} } return $PSO } } |