Model/POSTAccessDomainsSyncRB.ps1
# # Proxmox VE # Generated module to access all Proxmox VE Api Endpoints # Version: 0.6 # Contact: amna.wolf@gmail.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER RemoveVanished No description available. .PARAMETER DryRun No description available. .PARAMETER Scope No description available. .PARAMETER Full No description available. .PARAMETER EnableNew No description available. .PARAMETER Purge No description available. .OUTPUTS POSTAccessDomainsSyncRB<PSCustomObject> #> function Initialize-PVEPOSTAccessDomainsSyncRB { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidatePattern("(?:(?:(?:acl|properties|entry);)*(?:acl|properties|entry))|none")] [String] ${RemoveVanished}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${DryRun}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("users", "groups", "both")] [String] ${Scope}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Full}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${EnableNew}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Purge} ) Process { 'Creating PSCustomObject: ProxmoxPVE => PVEPOSTAccessDomainsSyncRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $DisplayNameMapping =@{ "RemoveVanished"="remove-vanished"; "DryRun"="dry-run"; "Scope"="scope"; "Full"="full"; "EnableNew"="enable-new"; "Purge"="purge" } $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 POSTAccessDomainsSyncRB<PSCustomObject> .DESCRIPTION Convert from JSON to POSTAccessDomainsSyncRB<PSCustomObject> .PARAMETER Json Json object .OUTPUTS POSTAccessDomainsSyncRB<PSCustomObject> #> function ConvertFrom-PVEJsonToPOSTAccessDomainsSyncRB { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: ProxmoxPVE => PVEPOSTAccessDomainsSyncRB' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PVEPOSTAccessDomainsSyncRB $AllProperties = ("remove-vanished", "dry-run", "scope", "full", "enable-new", "purge") 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 "remove-vanished"))) { #optional property not found $RemoveVanished = $null } else { $RemoveVanished = $JsonParameters.PSobject.Properties["remove-vanished"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "dry-run"))) { #optional property not found $DryRun = $null } else { $DryRun = $JsonParameters.PSobject.Properties["dry-run"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "scope"))) { #optional property not found $Scope = $null } else { $Scope = $JsonParameters.PSobject.Properties["scope"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "full"))) { #optional property not found $Full = $null } else { $Full = $JsonParameters.PSobject.Properties["full"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "enable-new"))) { #optional property not found $EnableNew = $null } else { $EnableNew = $JsonParameters.PSobject.Properties["enable-new"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "purge"))) { #optional property not found $Purge = $null } else { $Purge = $JsonParameters.PSobject.Properties["purge"].value } $PSO = [PSCustomObject]@{ "remove-vanished" = ${RemoveVanished} "dry-run" = ${DryRun} "scope" = ${Scope} "full" = ${Full} "enable-new" = ${EnableNew} "purge" = ${Purge} } return $PSO } } |