Model/ApprovalconfigEscalationConfigEscalationChainInner.ps1

#
# Identity Security Cloud API - Approvals
# 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 Tier
Starting at 1 defines the order in which the identities will get assigned
.PARAMETER IdentityId
Optional Identity ID of the type of identity defined in the 'identityType' field.
.PARAMETER IdentityType
Type of identityId in the escalation chain.
.OUTPUTS

ApprovalconfigEscalationConfigEscalationChainInner<PSCustomObject>
#>


function Initialize-ApprovalconfigEscalationConfigEscalationChainInner {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int64]]
        ${Tier},
        [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", "ACCESS_PROFILE_PRIMARY_OWNER", "APPLICATION_PRIMARY_OWNER", "ENTITLEMENT_PRIMARY_OWNER", "ROLE_PRIMARY_OWNER", "SOURCE_PRIMARY_OWNER")]
        [String]
        ${IdentityType}
    )

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


        $PSO = [PSCustomObject]@{
            "tier" = ${Tier}
            "identityId" = ${IdentityId}
            "identityType" = ${IdentityType}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to ApprovalconfigEscalationConfigEscalationChainInner<PSCustomObject>

.DESCRIPTION

Convert from JSON to ApprovalconfigEscalationConfigEscalationChainInner<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

ApprovalconfigEscalationConfigEscalationChainInner<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

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

        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 "identityType"))) { #optional property not found
            $IdentityType = $null
        } else {
            $IdentityType = $JsonParameters.PSobject.Properties["identityType"].value
        }

        $PSO = [PSCustomObject]@{
            "tier" = ${Tier}
            "identityId" = ${IdentityId}
            "identityType" = ${IdentityType}
        }

        return $PSO
    }

}