cc/src/PSSailpointCC/Model/UpdateUserPermissionsRequest.ps1
# # IdentityNow cc (private) APIs # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Ids No description available. .PARAMETER IsAdmin Indicates if user should be an IDN Admin. ""0"" for false, ""1"" for true. .PARAMETER AdminType No description available. .OUTPUTS UpdateUserPermissionsRequest<PSCustomObject> #> function Initialize-CCUpdateUserPermissionsRequest { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${Ids}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [String] ${IsAdmin}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [ValidateSet("ADMIN", "CERT_ADMIN", "HELPDESK", "REPORT_ADMIN", "ROLE_ADMIN", "ROLE_SUBADMIN", "SOURCE_ADMIN", "SOURCE_SUBADMIN")] [String] ${AdminType} ) Process { 'Creating PSCustomObject: PSSailpointCC => CCUpdateUserPermissionsRequest' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "ids" = ${Ids} "isAdmin" = ${IsAdmin} "adminType" = ${AdminType} } return $PSO } } <# .SYNOPSIS Convert from JSON to UpdateUserPermissionsRequest<PSCustomObject> .DESCRIPTION Convert from JSON to UpdateUserPermissionsRequest<PSCustomObject> .PARAMETER Json Json object .OUTPUTS UpdateUserPermissionsRequest<PSCustomObject> #> function ConvertFrom-CCJsonToUpdateUserPermissionsRequest { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpointCC => CCUpdateUserPermissionsRequest' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in CCUpdateUserPermissionsRequest $AllProperties = ("ids", "isAdmin", "adminType") 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 "ids"))) { #optional property not found $Ids = $null } else { $Ids = $JsonParameters.PSobject.Properties["ids"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isAdmin"))) { #optional property not found $IsAdmin = $null } else { $IsAdmin = $JsonParameters.PSobject.Properties["isAdmin"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "adminType"))) { #optional property not found $AdminType = $null } else { $AdminType = $JsonParameters.PSobject.Properties["adminType"].value } $PSO = [PSCustomObject]@{ "ids" = ${Ids} "isAdmin" = ${IsAdmin} "adminType" = ${AdminType} } return $PSO } } |