jit-activations/src/PSSailpoint.JitActivations/Model/JitactivationhistorydocumentSummary.ps1

#
# Identity Security Cloud API - JIT Activations
# 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: v1
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

High-level friction summary for the activation, including policy matches, reauthentication, justification, and ticket details. Null when no policy was matched or frictions were not evaluated.

.PARAMETER PolicyMatches
List of policies that matched during activation evaluation.
.PARAMETER Reauthentication
No description available.
.PARAMETER Justification
No description available.
.PARAMETER ServiceNowTicket
No description available.
.OUTPUTS

JitactivationhistorydocumentSummary<PSCustomObject>
#>


function Initialize-JitactivationhistorydocumentSummary {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${PolicyMatches},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Reauthentication},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Justification},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ServiceNowTicket}
    )

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


        $PSO = [PSCustomObject]@{
            "policyMatches" = ${PolicyMatches}
            "reauthentication" = ${Reauthentication}
            "justification" = ${Justification}
            "serviceNowTicket" = ${ServiceNowTicket}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to JitactivationhistorydocumentSummary<PSCustomObject>

.DESCRIPTION

Convert from JSON to JitactivationhistorydocumentSummary<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

JitactivationhistorydocumentSummary<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in JitactivationhistorydocumentSummary
        $AllProperties = ("policyMatches", "reauthentication", "justification", "serviceNowTicket")
        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 "policyMatches"))) { #optional property not found
            $PolicyMatches = $null
        } else {
            $PolicyMatches = $JsonParameters.PSobject.Properties["policyMatches"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "policyMatches" = ${PolicyMatches}
            "reauthentication" = ${Reauthentication}
            "justification" = ${Justification}
            "serviceNowTicket" = ${ServiceNowTicket}
        }

        return $PSO
    }

}