Model/CustomPasswordInstruction.ps1

#
# Identity Security Cloud V2024 API
# 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: v2024
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER PageId
The page ID that represents the page for forget user name, reset password and unlock account flow.
.PARAMETER PageContent
The custom instructions for the specified page. Allow basic HTML format and maximum length is 1000 characters. The custom instructions will be sanitized to avoid attacks. If the customization text includes a link, like <A HREF=\""URL\"">...</A> clicking on this will open the link on the current browser page. If you want your link to be redirected to a different page, please redirect it to ""_blank"" like this: <a href=\""URL"" target=\""_blank\"" >link</a>. This will open a new tab when the link is clicked. Notice we're only supporting _blank as the redirection target.
.PARAMETER Locale
The locale for the custom instructions, a BCP47 language tag. The default value is \""default\"".
.OUTPUTS

CustomPasswordInstruction<PSCustomObject>
#>


function Initialize-V2024CustomPasswordInstruction {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("change-password:enter-password", "change-password:finish", "flow-selection:select", "forget-username:user-email", "mfa:enter-code", "mfa:enter-kba", "mfa:select", "reset-password:enter-password", "reset-password:enter-username", "reset-password:finish", "unlock-account:enter-username", "unlock-account:finish")]
        [String]
        ${PageId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${PageContent},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Locale}
    )

    Process {
        'Creating PSCustomObject: Tm.V2024 => V2024CustomPasswordInstruction' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "pageId" = ${PageId}
            "pageContent" = ${PageContent}
            "locale" = ${Locale}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to CustomPasswordInstruction<PSCustomObject>

.DESCRIPTION

Convert from JSON to CustomPasswordInstruction<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

CustomPasswordInstruction<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: Tm.V2024 => V2024CustomPasswordInstruction' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

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

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

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

        $PSO = [PSCustomObject]@{
            "pageId" = ${PageId}
            "pageContent" = ${PageContent}
            "locale" = ${Locale}
        }

        return $PSO
    }

}