v2026/src/PSSailpoint.V2026/Model/ApprovalDetails.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 Contains comprehensive details about the approval process, including the approver's information, comments, decision date, serial order, and the current status of the approval request. .PARAMETER Approver No description available. .PARAMETER ApproverComments Comments added by approver while rejecting or approving the account deletion request. .PARAMETER SerialOrder SerialOrder of approval details. .PARAMETER Status No description available. .OUTPUTS ApprovalDetails<PSCustomObject> #> function Initialize-V2026ApprovalDetails { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Approver}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ApproverComments}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${SerialOrder}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("PENDING", "CANCELLED", "APPROVED", "REJECTED", "PASSED", "FAILED")] [PSCustomObject] ${Status} ) Process { 'Creating PSCustomObject: PSSailpoint.V2026 => V2026ApprovalDetails' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "approver" = ${Approver} "approverComments" = ${ApproverComments} "serialOrder" = ${SerialOrder} "status" = ${Status} } return $PSO } } <# .SYNOPSIS Convert from JSON to ApprovalDetails<PSCustomObject> .DESCRIPTION Convert from JSON to ApprovalDetails<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ApprovalDetails<PSCustomObject> #> function ConvertFrom-V2026JsonToApprovalDetails { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2026 => V2026ApprovalDetails' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2026ApprovalDetails $AllProperties = ("approver", "approverComments", "decisionDate", "serialOrder", "status") 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 "approver"))) { #optional property not found $Approver = $null } else { $Approver = $JsonParameters.PSobject.Properties["approver"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approverComments"))) { #optional property not found $ApproverComments = $null } else { $ApproverComments = $JsonParameters.PSobject.Properties["approverComments"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "decisionDate"))) { #optional property not found $DecisionDate = $null } else { $DecisionDate = $JsonParameters.PSobject.Properties["decisionDate"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "serialOrder"))) { #optional property not found $SerialOrder = $null } else { $SerialOrder = $JsonParameters.PSobject.Properties["serialOrder"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } $PSO = [PSCustomObject]@{ "approver" = ${Approver} "approverComments" = ${ApproverComments} "decisionDate" = ${DecisionDate} "serialOrder" = ${SerialOrder} "status" = ${Status} } return $PSO } } |