Model/ReassignmentTrail.ps1
|
# # Identity Security Cloud API - Next Generation Certification Campaigns # Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. # Version: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER PreviousReviewer No description available. .PARAMETER NewReviewer No description available. .PARAMETER ReassignmentType The type of reassignment. .OUTPUTS ReassignmentTrail<PSCustomObject> #> function Initialize-ReassignmentTrail { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${PreviousReviewer}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${NewReviewer}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("AUTOMATIC_REASSIGNMENT", "MANUAL_REASSIGNMENT", "SELF_REVIEW_DELEGATION")] [String] ${ReassignmentType} ) Process { 'Creating PSCustomObject: PSSailpoint.GovCertification => ReassignmentTrail' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "previousReviewer" = ${PreviousReviewer} "newReviewer" = ${NewReviewer} "reassignmentType" = ${ReassignmentType} } return $PSO } } <# .SYNOPSIS Convert from JSON to ReassignmentTrail<PSCustomObject> .DESCRIPTION Convert from JSON to ReassignmentTrail<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ReassignmentTrail<PSCustomObject> #> function ConvertFrom-JsonToReassignmentTrail { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.GovCertification => ReassignmentTrail' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ReassignmentTrail $AllProperties = ("previousReviewer", "newReviewer", "reassignmentType") 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 "previousReviewer"))) { #optional property not found $PreviousReviewer = $null } else { $PreviousReviewer = $JsonParameters.PSobject.Properties["previousReviewer"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "newReviewer"))) { #optional property not found $NewReviewer = $null } else { $NewReviewer = $JsonParameters.PSobject.Properties["newReviewer"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reassignmentType"))) { #optional property not found $ReassignmentType = $null } else { $ReassignmentType = $JsonParameters.PSobject.Properties["reassignmentType"].value } $PSO = [PSCustomObject]@{ "previousReviewer" = ${PreviousReviewer} "newReviewer" = ${NewReviewer} "reassignmentType" = ${ReassignmentType} } return $PSO } } |