Model/PUTClusterSdnFabricsNodeRB.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 Protocol No description available. .PARAMETER Ip6 No description available. .PARAMETER Ip No description available. .PARAMETER Delete No description available. .PARAMETER LockToken No description available. .PARAMETER NodeId No description available. .PARAMETER FabricId No description available. .PARAMETER Digest No description available. .PARAMETER Interfaces No description available. .OUTPUTS PUTClusterSdnFabricsNodeRB<PSCustomObject> #> function Initialize-PVEPUTClusterSdnFabricsNodeRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("openfabric", "ospf")] [String] ${Protocol}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Ip6}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Ip}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("interfaces", "ip", "ip6")] [String[]] ${Delete}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${LockToken}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${NodeId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${FabricId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Digest}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Interfaces} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPUTClusterSdnFabricsNodeRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Digest -and $Digest.length -gt 64) { throw "invalid value for 'Digest', the character length must be smaller than or equal to 64." } $DisplayNameMapping =@{ "Protocol"="protocol"; "Ip6"="ip6"; "Ip"="ip"; "Delete"="delete"; "LockToken"="lock-token"; "NodeId"="node_id"; "FabricId"="fabric_id"; "Digest"="digest"; "Interfaces"="interfaces" } $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 PUTClusterSdnFabricsNodeRB<PSCustomObject> .DESCRIPTION Convert from JSON to PUTClusterSdnFabricsNodeRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS PUTClusterSdnFabricsNodeRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPUTClusterSdnFabricsNodeRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPUTClusterSdnFabricsNodeRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPUTClusterSdnFabricsNodeRB $AllProperties = ("protocol", "ip6", "ip", "delete", "lock-token", "node_id", "fabric_id", "digest", "interfaces") 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 "ip6"))) { #optional property not found $Ip6 = $null } else { $Ip6 = $JsonParameters.PSobject.Properties["ip6"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ip"))) { #optional property not found $Ip = $null } else { $Ip = $JsonParameters.PSobject.Properties["ip"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "delete"))) { #optional property not found $Delete = $null } else { $Delete = $JsonParameters.PSobject.Properties["delete"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lock-token"))) { #optional property not found $LockToken = $null } else { $LockToken = $JsonParameters.PSobject.Properties["lock-token"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "node_id"))) { #optional property not found $NodeId = $null } else { $NodeId = $JsonParameters.PSobject.Properties["node_id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "fabric_id"))) { #optional property not found $FabricId = $null } else { $FabricId = $JsonParameters.PSobject.Properties["fabric_id"].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 "interfaces"))) { #optional property not found $Interfaces = $null } else { $Interfaces = $JsonParameters.PSobject.Properties["interfaces"].value } $PSO = [PSCustomObject]@{ "protocol" = ${Protocol} "ip6" = ${Ip6} "ip" = ${Ip} "delete" = ${Delete} "lock-token" = ${LockToken} "node_id" = ${NodeId} "fabric_id" = ${FabricId} "digest" = ${Digest} "interfaces" = ${Interfaces} } return $PSO } } |