Model/NodesSdnFabricsNeighborsInner.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 Neighbor No description available. .PARAMETER Status No description available. .PARAMETER Uptime No description available. .OUTPUTS NodesSdnFabricsNeighborsInner<PSCustomObject> #> function Initialize-PVENodesSdnFabricsNeighborsInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Neighbor}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Uptime} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesSdnFabricsNeighborsInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Neighbor"="neighbor"; "Status"="status"; "Uptime"="uptime" } $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 NodesSdnFabricsNeighborsInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesSdnFabricsNeighborsInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesSdnFabricsNeighborsInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesSdnFabricsNeighborsInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesSdnFabricsNeighborsInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesSdnFabricsNeighborsInner $AllProperties = ("neighbor", "status", "uptime") 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 "neighbor"))) { #optional property not found $Neighbor = $null } else { $Neighbor = $JsonParameters.PSobject.Properties["neighbor"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "uptime"))) { #optional property not found $Uptime = $null } else { $Uptime = $JsonParameters.PSobject.Properties["uptime"].value } $PSO = [PSCustomObject]@{ "neighbor" = ${Neighbor} "status" = ${Status} "uptime" = ${Uptime} } return $PSO } } |