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

Justification friction details.

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

JitactivationhistorydocumentSummaryJustification<PSCustomObject>
#>


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

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


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

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to JitactivationhistorydocumentSummaryJustification<PSCustomObject>

.DESCRIPTION

Convert from JSON to JitactivationhistorydocumentSummaryJustification<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

JitactivationhistorydocumentSummaryJustification<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in JitactivationhistorydocumentSummaryJustification
        $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
    }

}