v2026/src/PSSailpoint.V2026/Model/AccountActionRequestDto.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

Represents a request to perform an action on an account, such as deletion or modification.

.PARAMETER AccountRequestId
Account requester ID.
.PARAMETER RequestType
Access item requester's identity ID.
.PARAMETER OverallStatus
Overall status of deletion request.
.PARAMETER Requester
No description available.
.PARAMETER RequesterComments
Comments added by the requester while creating the account deletion request.
.PARAMETER AccountDetails
No description available.
.PARAMETER CorrelatedIdentity
No description available.
.PARAMETER ManagerReference
No description available.
.PARAMETER ApprovalRequestId
ID of the approval request associated with the account deletion action.
.PARAMETER AccountRequestPhases
List of account request phases.
.PARAMETER ApprovalDetails
List approval details
.PARAMETER ErrorDetails
Detailed error information.
.OUTPUTS

AccountActionRequestDto<PSCustomObject>
#>


function Initialize-V2026AccountActionRequestDto {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountRequestId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${RequestType},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${OverallStatus},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Requester},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${RequesterComments},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${AccountDetails},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${CorrelatedIdentity},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ManagerReference},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ApprovalRequestId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${AccountRequestPhases},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${ApprovalDetails},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ErrorDetails}
    )

    Process {
        'Creating PSCustomObject: PSSailpoint.V2026 => V2026AccountActionRequestDto' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "accountRequestId" = ${AccountRequestId}
            "requestType" = ${RequestType}
            "overallStatus" = ${OverallStatus}
            "requester" = ${Requester}
            "requesterComments" = ${RequesterComments}
            "accountDetails" = ${AccountDetails}
            "correlatedIdentity" = ${CorrelatedIdentity}
            "managerReference" = ${ManagerReference}
            "approvalRequestId" = ${ApprovalRequestId}
            "accountRequestPhases" = ${AccountRequestPhases}
            "approvalDetails" = ${ApprovalDetails}
            "errorDetails" = ${ErrorDetails}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to AccountActionRequestDto<PSCustomObject>

.DESCRIPTION

Convert from JSON to AccountActionRequestDto<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

AccountActionRequestDto<PSCustomObject>
#>

function ConvertFrom-V2026JsonToAccountActionRequestDto {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: PSSailpoint.V2026 => V2026AccountActionRequestDto' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2026AccountActionRequestDto
        $AllProperties = ("accountRequestId", "requestType", "createdAt", "completedAt", "overallStatus", "requester", "requesterComments", "accountDetails", "correlatedIdentity", "managerReference", "approvalRequestId", "accountRequestPhases", "approvalDetails", "errorDetails")
        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 "accountRequestId"))) { #optional property not found
            $AccountRequestId = $null
        } else {
            $AccountRequestId = $JsonParameters.PSobject.Properties["accountRequestId"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "requestType"))) { #optional property not found
            $RequestType = $null
        } else {
            $RequestType = $JsonParameters.PSobject.Properties["requestType"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "createdAt"))) { #optional property not found
            $CreatedAt = $null
        } else {
            $CreatedAt = $JsonParameters.PSobject.Properties["createdAt"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "completedAt"))) { #optional property not found
            $CompletedAt = $null
        } else {
            $CompletedAt = $JsonParameters.PSobject.Properties["completedAt"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "overallStatus"))) { #optional property not found
            $OverallStatus = $null
        } else {
            $OverallStatus = $JsonParameters.PSobject.Properties["overallStatus"].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 "requesterComments"))) { #optional property not found
            $RequesterComments = $null
        } else {
            $RequesterComments = $JsonParameters.PSobject.Properties["requesterComments"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accountDetails"))) { #optional property not found
            $AccountDetails = $null
        } else {
            $AccountDetails = $JsonParameters.PSobject.Properties["accountDetails"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "correlatedIdentity"))) { #optional property not found
            $CorrelatedIdentity = $null
        } else {
            $CorrelatedIdentity = $JsonParameters.PSobject.Properties["correlatedIdentity"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "managerReference"))) { #optional property not found
            $ManagerReference = $null
        } else {
            $ManagerReference = $JsonParameters.PSobject.Properties["managerReference"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvalRequestId"))) { #optional property not found
            $ApprovalRequestId = $null
        } else {
            $ApprovalRequestId = $JsonParameters.PSobject.Properties["approvalRequestId"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accountRequestPhases"))) { #optional property not found
            $AccountRequestPhases = $null
        } else {
            $AccountRequestPhases = $JsonParameters.PSobject.Properties["accountRequestPhases"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvalDetails"))) { #optional property not found
            $ApprovalDetails = $null
        } else {
            $ApprovalDetails = $JsonParameters.PSobject.Properties["approvalDetails"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "errorDetails"))) { #optional property not found
            $ErrorDetails = $null
        } else {
            $ErrorDetails = $JsonParameters.PSobject.Properties["errorDetails"].value
        }

        $PSO = [PSCustomObject]@{
            "accountRequestId" = ${AccountRequestId}
            "requestType" = ${RequestType}
            "createdAt" = ${CreatedAt}
            "completedAt" = ${CompletedAt}
            "overallStatus" = ${OverallStatus}
            "requester" = ${Requester}
            "requesterComments" = ${RequesterComments}
            "accountDetails" = ${AccountDetails}
            "correlatedIdentity" = ${CorrelatedIdentity}
            "managerReference" = ${ManagerReference}
            "approvalRequestId" = ${ApprovalRequestId}
            "accountRequestPhases" = ${AccountRequestPhases}
            "approvalDetails" = ${ApprovalDetails}
            "errorDetails" = ${ErrorDetails}
        }

        return $PSO
    }

}