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

No description available.

.PARAMETER Type
Type of friction control.
.PARAMETER BypassAllowed
Whether the user had permission to bypass this friction.
.PARAMETER SubmittedData
Data submitted by the user to satisfy this friction (e.g. ticket ID, justification text).
.PARAMETER Status
Completion status of this friction item.
.OUTPUTS

JitactivationhistorydocumentFrictionsInner<PSCustomObject>
#>


function Initialize-JitactivationhistorydocumentFrictionsInner {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Type},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${BypassAllowed} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${SubmittedData},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Status}
    )

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


        $PSO = [PSCustomObject]@{
            "type" = ${Type}
            "bypassAllowed" = ${BypassAllowed}
            "submittedData" = ${SubmittedData}
            "status" = ${Status}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to JitactivationhistorydocumentFrictionsInner<PSCustomObject>

.DESCRIPTION

Convert from JSON to JitactivationhistorydocumentFrictionsInner<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

JitactivationhistorydocumentFrictionsInner<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in JitactivationhistorydocumentFrictionsInner
        $AllProperties = ("type", "bypassAllowed", "submittedData", "status")
        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 "type"))) { #optional property not found
            $Type = $null
        } else {
            $Type = $JsonParameters.PSobject.Properties["type"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "type" = ${Type}
            "bypassAllowed" = ${BypassAllowed}
            "submittedData" = ${SubmittedData}
            "status" = ${Status}
        }

        return $PSO
    }

}