Model/ClusterSdnControllersInner.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.0.8 # Version: 9.0.8 # Contact: mail@timo-wolf.de # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER IsisIfaces No description available. .PARAMETER EbgpMultihop No description available. .PARAMETER IsisDomain No description available. .PARAMETER IsisNet No description available. .PARAMETER BgpMultipathAsRelax No description available. .PARAMETER Asn No description available. .PARAMETER State No description available. .PARAMETER Ebgp No description available. .PARAMETER Type No description available. .PARAMETER Digest No description available. .PARAMETER Pending No description available. .PARAMETER Node No description available. .PARAMETER Controller No description available. .PARAMETER Loopback No description available. .PARAMETER Peers No description available. .OUTPUTS ClusterSdnControllersInner<PSCustomObject> #> function Initialize-PVEClusterSdnControllersInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${IsisIfaces}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${EbgpMultihop}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${IsisDomain}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${IsisNet}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${BgpMultipathAsRelax}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Asn}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("new", "changed", "deleted")] [String] ${State}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Ebgp}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("bgp", "evpn", "faucet", "isis")] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Digest}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Pending}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Node}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Controller}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Loopback}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Peers} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEClusterSdnControllersInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($Asn -and $Asn -gt 4294967295) { throw "invalid value for 'Asn', must be smaller than or equal to 4294967295." } $DisplayNameMapping =@{ "IsisIfaces"="isis-ifaces"; "EbgpMultihop"="ebgp-multihop"; "IsisDomain"="isis-domain"; "IsisNet"="isis-net"; "BgpMultipathAsRelax"="bgp-multipath-as-relax"; "Asn"="asn"; "State"="state"; "Ebgp"="ebgp"; "Type"="type"; "Digest"="digest"; "Pending"="pending"; "Node"="node"; "Controller"="controller"; "Loopback"="loopback"; "Peers"="peers" } $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 ClusterSdnControllersInner<PSCustomObject> .DESCRIPTION Convert from JSON to ClusterSdnControllersInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ClusterSdnControllersInner<PSCustomObject> #> function ConvertFrom-PVEJsonToClusterSdnControllersInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEClusterSdnControllersInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEClusterSdnControllersInner $AllProperties = ("isis-ifaces", "ebgp-multihop", "isis-domain", "isis-net", "bgp-multipath-as-relax", "asn", "state", "ebgp", "type", "digest", "pending", "node", "controller", "loopback", "peers") 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 "isis-ifaces"))) { #optional property not found $IsisIfaces = $null } else { $IsisIfaces = $JsonParameters.PSobject.Properties["isis-ifaces"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ebgp-multihop"))) { #optional property not found $EbgpMultihop = $null } else { $EbgpMultihop = $JsonParameters.PSobject.Properties["ebgp-multihop"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isis-domain"))) { #optional property not found $IsisDomain = $null } else { $IsisDomain = $JsonParameters.PSobject.Properties["isis-domain"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isis-net"))) { #optional property not found $IsisNet = $null } else { $IsisNet = $JsonParameters.PSobject.Properties["isis-net"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "bgp-multipath-as-relax"))) { #optional property not found $BgpMultipathAsRelax = $null } else { $BgpMultipathAsRelax = $JsonParameters.PSobject.Properties["bgp-multipath-as-relax"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "asn"))) { #optional property not found $Asn = $null } else { $Asn = $JsonParameters.PSobject.Properties["asn"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "state"))) { #optional property not found $State = $null } else { $State = $JsonParameters.PSobject.Properties["state"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ebgp"))) { #optional property not found $Ebgp = $null } else { $Ebgp = $JsonParameters.PSobject.Properties["ebgp"].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 "digest"))) { #optional property not found $Digest = $null } else { $Digest = $JsonParameters.PSobject.Properties["digest"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "pending"))) { #optional property not found $Pending = $null } else { $Pending = $JsonParameters.PSobject.Properties["pending"].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 "controller"))) { #optional property not found $Controller = $null } else { $Controller = $JsonParameters.PSobject.Properties["controller"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "loopback"))) { #optional property not found $Loopback = $null } else { $Loopback = $JsonParameters.PSobject.Properties["loopback"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "peers"))) { #optional property not found $Peers = $null } else { $Peers = $JsonParameters.PSobject.Properties["peers"].value } $PSO = [PSCustomObject]@{ "isis-ifaces" = ${IsisIfaces} "ebgp-multihop" = ${EbgpMultihop} "isis-domain" = ${IsisDomain} "isis-net" = ${IsisNet} "bgp-multipath-as-relax" = ${BgpMultipathAsRelax} "asn" = ${Asn} "state" = ${State} "ebgp" = ${Ebgp} "type" = ${Type} "digest" = ${Digest} "pending" = ${Pending} "node" = ${Node} "controller" = ${Controller} "loopback" = ${Loopback} "peers" = ${Peers} } return $PSO } } |