v2025/src/PSSailpoint.V2025/Model/RolePropagationOngoingResponseRolePropagationDetails.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

Details of the ongoing role propagation process

.PARAMETER Id
Id of the Role Propagation process triggered.
.PARAMETER Status
Status of the Role Propagation process.
.PARAMETER ExecutionStage
Current execution stage of the Role Propagation process.
.PARAMETER Launched
Time when the Role Propagation process was launched.
.PARAMETER LaunchedBy
No description available.
.PARAMETER TerminatedBy
No description available.
.PARAMETER Completed
Time when the Role Propagation process was completed.
.PARAMETER FailureReason
Reason for failure if the Role Propagation process failed.
.PARAMETER SkipRoleRefresh
Indicates if the role refresh was skipped during the Role Propagation process.
.OUTPUTS

RolePropagationOngoingResponseRolePropagationDetails<PSCustomObject>
#>


function Initialize-V2025RolePropagationOngoingResponseRolePropagationDetails {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("RUNNING", "COMPLETED")]
        [String]
        ${Status},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("PENDING", "DATA_AGGREGATION_RUNNING", "LAUNCH_PROVISIONING", "SUCCEEDED", "FAILED", "TERMINATED")]
        [String]
        ${ExecutionStage},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${Launched},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${LaunchedBy},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${TerminatedBy},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${Completed},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${FailureReason},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${SkipRoleRefresh} = $false
    )

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


        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "status" = ${Status}
            "executionStage" = ${ExecutionStage}
            "launched" = ${Launched}
            "launchedBy" = ${LaunchedBy}
            "terminatedBy" = ${TerminatedBy}
            "completed" = ${Completed}
            "failureReason" = ${FailureReason}
            "skipRoleRefresh" = ${SkipRoleRefresh}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to RolePropagationOngoingResponseRolePropagationDetails<PSCustomObject>

.DESCRIPTION

Convert from JSON to RolePropagationOngoingResponseRolePropagationDetails<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

RolePropagationOngoingResponseRolePropagationDetails<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2025RolePropagationOngoingResponseRolePropagationDetails
        $AllProperties = ("id", "status", "executionStage", "launched", "launchedBy", "terminatedBy", "completed", "failureReason", "skipRoleRefresh")
        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 "status"))) { #optional property not found
            $Status = $null
        } else {
            $Status = $JsonParameters.PSobject.Properties["status"].value
        }

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "status" = ${Status}
            "executionStage" = ${ExecutionStage}
            "launched" = ${Launched}
            "launchedBy" = ${LaunchedBy}
            "terminatedBy" = ${TerminatedBy}
            "completed" = ${Completed}
            "failureReason" = ${FailureReason}
            "skipRoleRefresh" = ${SkipRoleRefresh}
        }

        return $PSO
    }

}