jit-activations/src/PSSailpoint.JitActivations/Model/JitactivationhistorydocumentSummaryReauthentication.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

Reauthentication friction details.

.PARAMETER Required
Whether reauthentication was required for this activation.
.PARAMETER Bypassed
Whether the reauthentication requirement was bypassed.
.OUTPUTS

JitactivationhistorydocumentSummaryReauthentication<PSCustomObject>
#>


function Initialize-JitactivationhistorydocumentSummaryReauthentication {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Required} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Bypassed} = $false
    )

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


        $PSO = [PSCustomObject]@{
            "required" = ${Required}
            "bypassed" = ${Bypassed}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to JitactivationhistorydocumentSummaryReauthentication<PSCustomObject>

.DESCRIPTION

Convert from JSON to JitactivationhistorydocumentSummaryReauthentication<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

JitactivationhistorydocumentSummaryReauthentication<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in JitactivationhistorydocumentSummaryReauthentication
        $AllProperties = ("required", "bypassed")
        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 "required"))) { #optional property not found
            $Required = $null
        } else {
            $Required = $JsonParameters.PSobject.Properties["required"].value
        }

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

        $PSO = [PSCustomObject]@{
            "required" = ${Required}
            "bypassed" = ${Bypassed}
        }

        return $PSO
    }

}