Model/POSTClusterSdnVnetsRB.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 Zone No description available. .PARAMETER LockToken No description available. .PARAMETER Vnet No description available. .PARAMETER Alias No description available. .PARAMETER Type No description available. .PARAMETER IsolatePorts No description available. .PARAMETER Vlanaware No description available. .PARAMETER Tag No description available. .OUTPUTS POSTClusterSdnVnetsRB<PSCustomObject> #> function Initialize-PVEPOSTClusterSdnVnetsRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Zone}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${LockToken}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Vnet}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidatePattern("(?^i:[\(\)-_.\w\d\s]{0,256})")] [String] ${Alias}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("vnet")] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsolatePorts}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Vlanaware}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Tag} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPOSTClusterSdnVnetsRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Alias -and $Alias.length -gt 256) { throw "invalid value for 'Alias', the character length must be smaller than or equal to 256." } if ($Tag -and $Tag -gt 16777215) { throw "invalid value for 'Tag', must be smaller than or equal to 16777215." } if ($Tag -and $Tag -lt 1) { throw "invalid value for 'Tag', must be greater than or equal to 1." } $DisplayNameMapping =@{ "Zone"="zone"; "LockToken"="lock-token"; "Vnet"="vnet"; "Alias"="alias"; "Type"="type"; "IsolatePorts"="isolate-ports"; "Vlanaware"="vlanaware"; "Tag"="tag" } $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 POSTClusterSdnVnetsRB<PSCustomObject> .DESCRIPTION Convert from JSON to POSTClusterSdnVnetsRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS POSTClusterSdnVnetsRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPOSTClusterSdnVnetsRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPOSTClusterSdnVnetsRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPOSTClusterSdnVnetsRB $AllProperties = ("zone", "lock-token", "vnet", "alias", "type", "isolate-ports", "vlanaware", "tag") 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 "zone"))) { #optional property not found $Zone = $null } else { $Zone = $JsonParameters.PSobject.Properties["zone"].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 "vnet"))) { #optional property not found $Vnet = $null } else { $Vnet = $JsonParameters.PSobject.Properties["vnet"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "alias"))) { #optional property not found $Alias = $null } else { $Alias = $JsonParameters.PSobject.Properties["alias"].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 "isolate-ports"))) { #optional property not found $IsolatePorts = $null } else { $IsolatePorts = $JsonParameters.PSobject.Properties["isolate-ports"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "vlanaware"))) { #optional property not found $Vlanaware = $null } else { $Vlanaware = $JsonParameters.PSobject.Properties["vlanaware"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "tag"))) { #optional property not found $Tag = $null } else { $Tag = $JsonParameters.PSobject.Properties["tag"].value } $PSO = [PSCustomObject]@{ "zone" = ${Zone} "lock-token" = ${LockToken} "vnet" = ${Vnet} "alias" = ${Alias} "type" = ${Type} "isolate-ports" = ${IsolatePorts} "vlanaware" = ${Vlanaware} "tag" = ${Tag} } return $PSO } } |