Model/NodesSdnZonesIpvrfInner.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 Protocol No description available. .PARAMETER Nexthops No description available. .PARAMETER Metric No description available. .PARAMETER Ip No description available. .OUTPUTS NodesSdnZonesIpvrfInner<PSCustomObject> #> function Initialize-PVENodesSdnZonesIpvrfInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Protocol}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Nexthops}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Metric}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Ip} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVENodesSdnZonesIpvrfInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "Protocol"="protocol"; "Nexthops"="nexthops"; "Metric"="metric"; "Ip"="ip" } $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 NodesSdnZonesIpvrfInner<PSCustomObject> .DESCRIPTION Convert from JSON to NodesSdnZonesIpvrfInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NodesSdnZonesIpvrfInner<PSCustomObject> #> function ConvertFrom-PVEJsonToNodesSdnZonesIpvrfInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVENodesSdnZonesIpvrfInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVENodesSdnZonesIpvrfInner $AllProperties = ("protocol", "nexthops", "metric", "ip") 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 "protocol"))) { #optional property not found $Protocol = $null } else { $Protocol = $JsonParameters.PSobject.Properties["protocol"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "nexthops"))) { #optional property not found $Nexthops = $null } else { $Nexthops = $JsonParameters.PSobject.Properties["nexthops"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "metric"))) { #optional property not found $Metric = $null } else { $Metric = $JsonParameters.PSobject.Properties["metric"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ip"))) { #optional property not found $Ip = $null } else { $Ip = $JsonParameters.PSobject.Properties["ip"].value } $PSO = [PSCustomObject]@{ "protocol" = ${Protocol} "nexthops" = ${Nexthops} "metric" = ${Metric} "ip" = ${Ip} } return $PSO } } |