Model/ApprovalConfig.ps1
|
# # Identity Security Cloud v2026 API # 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: v2026 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Approvers Approvers must be listed as a comma-separated string, with each entry representing an individual or group authorized to approve account creation or deletion requests. .PARAMETER Comments Specifies the approval status for an account creation or deletion request. Allowed values are APPROVAL, REJECTION, ALL, and OFF. .OUTPUTS ApprovalConfig<PSCustomObject> #> function Initialize-V2026ApprovalConfig { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Approvers}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("APPROVAL", "REJECTION", "ALL", "false")] [String] ${Comments} ) Process { 'Creating PSCustomObject: PSSailpoint.V2026 => V2026ApprovalConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "approvers" = ${Approvers} "comments" = ${Comments} } return $PSO } } <# .SYNOPSIS Convert from JSON to ApprovalConfig<PSCustomObject> .DESCRIPTION Convert from JSON to ApprovalConfig<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ApprovalConfig<PSCustomObject> #> function ConvertFrom-V2026JsonToApprovalConfig { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2026 => V2026ApprovalConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2026ApprovalConfig $AllProperties = ("approvers", "comments") 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 "approvers"))) { #optional property not found $Approvers = $null } else { $Approvers = $JsonParameters.PSobject.Properties["approvers"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "comments"))) { #optional property not found $Comments = $null } else { $Comments = $JsonParameters.PSobject.Properties["comments"].value } $PSO = [PSCustomObject]@{ "approvers" = ${Approvers} "comments" = ${Comments} } return $PSO } } |