v2025/src/PSSailpoint.V2025/Model/Approval.ps1
|
# # Identity Security Cloud V2025 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: v2025 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Approval Object .PARAMETER Id The Approval ID .PARAMETER TenantId The Tenant ID of the Approval .PARAMETER Type The type of the approval, such as ENTITLEMENT_DESCRIPTIONS, CUSTOM_ACCESS_REQUEST_APPROVAL, GENERIC_APPROVAL .PARAMETER Approvers Object representation of an approver of an approval .PARAMETER CreatedDate Date the approval was created .PARAMETER DueDate Date the approval is due .PARAMETER EscalationStep Step in the escalation process. If set to 0, the approval is not escalated. If set to 1, the approval is escalated to the first approver in the escalation chain. .PARAMETER SerialStep The serial step of the approval in the approval chain. For example, serialStep 1 is the first approval to action in an approval request chain. Parallel approvals are set to 0. .PARAMETER IsEscalated Whether or not the approval has been escalated. Will reset to false when the approval is actioned on. .PARAMETER Name The name of the approval for a given locale .PARAMETER BatchRequest The name of the approval for a given locale .PARAMETER ApprovalConfig The configuration of the approval, such as the approval criteria and whether it is a parallel or serial approval .PARAMETER Description The description of the approval for a given locale .PARAMETER Medium Signifies what medium to use when sending notifications (currently only email is utilized) .PARAMETER Priority The priority of the approval .PARAMETER Requester Object representation of the requester of the approval .PARAMETER Requestee Object representation of the requestee of the approval .PARAMETER Comments Object representation of a comment on the approval .PARAMETER ApprovedBy Array of approvers who have approved the approval .PARAMETER RejectedBy Array of approvers who have rejected the approval .PARAMETER AssignedTo Array of identities that the approval request is currently assigned to/waiting on. For parallel approvals, this is set to all approvers left to approve. .PARAMETER CompletedDate Date the approval was completed .PARAMETER ApprovalCriteria No description available. .PARAMETER AdditionalAttributes Json string representing additional attributes known about the object to be approved. .PARAMETER ReferenceData Reference data related to the approval .PARAMETER ReassignmentHistory History of whom the approval request was assigned to .PARAMETER StaticAttributes Field that can include any static additional info that may be needed by the service that the approval request originated from .PARAMETER ModifiedDate Date/time that the approval request was last updated .PARAMETER RequestedTarget RequestedTarget used to specify the actual object or target the approval request is for .OUTPUTS Approval<PSCustomObject> #> function Initialize-V2025Approval { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${TenantId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Approvers}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${CreatedDate}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DueDate}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${EscalationStep}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${SerialStep}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsEscalated} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${BatchRequest}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ApprovalConfig}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Description}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("EMAIL", "SLACK", "TEAMS")] [String] ${Medium}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("HIGH", "MEDIUM", "LOW")] [String] ${Priority}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Requester}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Requestee}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Comments}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${ApprovedBy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${RejectedBy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${AssignedTo}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${CompletedDate}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ApprovalCriteria}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${AdditionalAttributes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${ReferenceData}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${ReassignmentHistory}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${StaticAttributes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${ModifiedDate}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${RequestedTarget} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025Approval' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "tenantId" = ${TenantId} "type" = ${Type} "approvers" = ${Approvers} "createdDate" = ${CreatedDate} "dueDate" = ${DueDate} "escalationStep" = ${EscalationStep} "serialStep" = ${SerialStep} "isEscalated" = ${IsEscalated} "name" = ${Name} "batchRequest" = ${BatchRequest} "approvalConfig" = ${ApprovalConfig} "description" = ${Description} "medium" = ${Medium} "priority" = ${Priority} "requester" = ${Requester} "requestee" = ${Requestee} "comments" = ${Comments} "approvedBy" = ${ApprovedBy} "rejectedBy" = ${RejectedBy} "assignedTo" = ${AssignedTo} "completedDate" = ${CompletedDate} "approvalCriteria" = ${ApprovalCriteria} "additionalAttributes" = ${AdditionalAttributes} "referenceData" = ${ReferenceData} "reassignmentHistory" = ${ReassignmentHistory} "staticAttributes" = ${StaticAttributes} "modifiedDate" = ${ModifiedDate} "requestedTarget" = ${RequestedTarget} } return $PSO } } <# .SYNOPSIS Convert from JSON to Approval<PSCustomObject> .DESCRIPTION Convert from JSON to Approval<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Approval<PSCustomObject> #> function ConvertFrom-V2025JsonToApproval { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025Approval' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025Approval $AllProperties = ("id", "tenantId", "type", "approvers", "createdDate", "dueDate", "escalationStep", "serialStep", "isEscalated", "name", "batchRequest", "approvalConfig", "description", "medium", "priority", "requester", "requestee", "comments", "approvedBy", "rejectedBy", "assignedTo", "completedDate", "approvalCriteria", "additionalAttributes", "referenceData", "reassignmentHistory", "staticAttributes", "modifiedDate", "requestedTarget") 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 "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "tenantId"))) { #optional property not found $TenantId = $null } else { $TenantId = $JsonParameters.PSobject.Properties["tenantId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found $Type = $null } else { $Type = $JsonParameters.PSobject.Properties["type"].value } 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 "createdDate"))) { #optional property not found $CreatedDate = $null } else { $CreatedDate = $JsonParameters.PSobject.Properties["createdDate"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "dueDate"))) { #optional property not found $DueDate = $null } else { $DueDate = $JsonParameters.PSobject.Properties["dueDate"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "escalationStep"))) { #optional property not found $EscalationStep = $null } else { $EscalationStep = $JsonParameters.PSobject.Properties["escalationStep"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "serialStep"))) { #optional property not found $SerialStep = $null } else { $SerialStep = $JsonParameters.PSobject.Properties["serialStep"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isEscalated"))) { #optional property not found $IsEscalated = $null } else { $IsEscalated = $JsonParameters.PSobject.Properties["isEscalated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "batchRequest"))) { #optional property not found $BatchRequest = $null } else { $BatchRequest = $JsonParameters.PSobject.Properties["batchRequest"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvalConfig"))) { #optional property not found $ApprovalConfig = $null } else { $ApprovalConfig = $JsonParameters.PSobject.Properties["approvalConfig"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "description"))) { #optional property not found $Description = $null } else { $Description = $JsonParameters.PSobject.Properties["description"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "medium"))) { #optional property not found $Medium = $null } else { $Medium = $JsonParameters.PSobject.Properties["medium"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "priority"))) { #optional property not found $Priority = $null } else { $Priority = $JsonParameters.PSobject.Properties["priority"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requester"))) { #optional property not found $Requester = $null } else { $Requester = $JsonParameters.PSobject.Properties["requester"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requestee"))) { #optional property not found $Requestee = $null } else { $Requestee = $JsonParameters.PSobject.Properties["requestee"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "comments"))) { #optional property not found $Comments = $null } else { $Comments = $JsonParameters.PSobject.Properties["comments"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvedBy"))) { #optional property not found $ApprovedBy = $null } else { $ApprovedBy = $JsonParameters.PSobject.Properties["approvedBy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "rejectedBy"))) { #optional property not found $RejectedBy = $null } else { $RejectedBy = $JsonParameters.PSobject.Properties["rejectedBy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "assignedTo"))) { #optional property not found $AssignedTo = $null } else { $AssignedTo = $JsonParameters.PSobject.Properties["assignedTo"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "completedDate"))) { #optional property not found $CompletedDate = $null } else { $CompletedDate = $JsonParameters.PSobject.Properties["completedDate"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvalCriteria"))) { #optional property not found $ApprovalCriteria = $null } else { $ApprovalCriteria = $JsonParameters.PSobject.Properties["approvalCriteria"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "additionalAttributes"))) { #optional property not found $AdditionalAttributes = $null } else { $AdditionalAttributes = $JsonParameters.PSobject.Properties["additionalAttributes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "referenceData"))) { #optional property not found $ReferenceData = $null } else { $ReferenceData = $JsonParameters.PSobject.Properties["referenceData"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reassignmentHistory"))) { #optional property not found $ReassignmentHistory = $null } else { $ReassignmentHistory = $JsonParameters.PSobject.Properties["reassignmentHistory"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "staticAttributes"))) { #optional property not found $StaticAttributes = $null } else { $StaticAttributes = $JsonParameters.PSobject.Properties["staticAttributes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "modifiedDate"))) { #optional property not found $ModifiedDate = $null } else { $ModifiedDate = $JsonParameters.PSobject.Properties["modifiedDate"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requestedTarget"))) { #optional property not found $RequestedTarget = $null } else { $RequestedTarget = $JsonParameters.PSobject.Properties["requestedTarget"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "tenantId" = ${TenantId} "type" = ${Type} "approvers" = ${Approvers} "createdDate" = ${CreatedDate} "dueDate" = ${DueDate} "escalationStep" = ${EscalationStep} "serialStep" = ${SerialStep} "isEscalated" = ${IsEscalated} "name" = ${Name} "batchRequest" = ${BatchRequest} "approvalConfig" = ${ApprovalConfig} "description" = ${Description} "medium" = ${Medium} "priority" = ${Priority} "requester" = ${Requester} "requestee" = ${Requestee} "comments" = ${Comments} "approvedBy" = ${ApprovedBy} "rejectedBy" = ${RejectedBy} "assignedTo" = ${AssignedTo} "completedDate" = ${CompletedDate} "approvalCriteria" = ${ApprovalCriteria} "additionalAttributes" = ${AdditionalAttributes} "referenceData" = ${ReferenceData} "reassignmentHistory" = ${ReassignmentHistory} "staticAttributes" = ${StaticAttributes} "modifiedDate" = ${ModifiedDate} "requestedTarget" = ${RequestedTarget} } return $PSO } } |