Model/ApprovalconfigFallbackApprover.ps1

#
# Identity Security Cloud API - Sources
# 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

Configuration for fallback approver. Used if the user cannot be found for whatever reason and escalation config does not exist.

.PARAMETER IdentityID
Optional Identity ID of the type of identity defined in the 'type' field.
.PARAMETER Type
Type of identityID for the fallback approver.
.OUTPUTS

ApprovalconfigFallbackApprover<PSCustomObject>
#>


function Initialize-ApprovalconfigFallbackApprover {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${IdentityID},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("IDENTITY", "MANAGER_OF", "ACCOUNT_OWNER", "MACHINE_ACCOUNT_OWNER", "MACHINE_IDENTITY_OWNER", "MANAGER_OF_REQUESTED_TARGET_OWNER", "MANAGER_OF_MACHINE_IDENTITY_OWNER", "MANAGER_OF_ACCOUNT_OWNER", "MANAGER_OF_MACHINE_ACCOUNT_OWNER", "MANAGER_OF_REQUESTER", "MANAGER_OF_REQUESTER_OWNER", "MANAGER_OF_OWNER", "ACCESS_PROFILE_OWNER", "APPLICATION_OWNER", "ENTITLEMENT_OWNER", "ROLE_OWNER", "SOURCE_OWNER", "REQUESTED_TARGET_OWNER", "ACCESS_PROFILE_PRIMARY_OWNER", "APPLICATION_PRIMARY_OWNER", "ENTITLEMENT_PRIMARY_OWNER", "ROLE_PRIMARY_OWNER", "SOURCE_PRIMARY_OWNER", "REQUESTED_TARGET_PRIMARY_OWNER")]
        [String]
        ${Type}
    )

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


        $PSO = [PSCustomObject]@{
            "identityID" = ${IdentityID}
            "type" = ${Type}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to ApprovalconfigFallbackApprover<PSCustomObject>

.DESCRIPTION

Convert from JSON to ApprovalconfigFallbackApprover<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

ApprovalconfigFallbackApprover<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

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

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

        $PSO = [PSCustomObject]@{
            "identityID" = ${IdentityID}
            "type" = ${Type}
        }

        return $PSO
    }

}