beta/src/PSSailpointBeta/Model/ConditionEffect.ps1

#
# IdentityNow Beta API
# Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. 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: 3.1.0-beta
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

ConditionEffect is the effect produced by a condition

.PARAMETER Config
Config is a arbitrary map that holds a configuration based on EffectType
.PARAMETER EffectType
EffectType is the type of effect to perform when the conditions are evaluated for this logic block HIDE ConditionEffectTypeHide ConditionEffectTypeHide disables validations SHOW ConditionEffectTypeShow ConditionEffectTypeShow enables validations DISABLE ConditionEffectTypeDisable ConditionEffectTypeDisable disables validations ENABLE ConditionEffectTypeEnable ConditionEffectTypeEnable enables validations REQUIRE ConditionEffectTypeRequire OPTIONAL ConditionEffectTypeOptional SUBMIT_MESSAGE ConditionEffectTypeSubmitMessage SUBMIT_NOTIFICATION ConditionEffectTypeSubmitNotification SET_DEFAULT_VALUE ConditionEffectTypeSetDefaultValue ConditionEffectTypeSetDefaultValue is ignored on purpose
.OUTPUTS

ConditionEffect<PSCustomObject>
#>


function Initialize-BetaConditionEffect {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [System.Collections.Hashtable]
        ${Config},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("HIDE", "SHOW", "DISABLE", "ENABLE", "REQUIRE", "OPTIONAL", "SUBMIT_MESSAGE", "SUBMIT_NOTIFICATION", "SET_DEFAULT_VALUE")]
        [String]
        ${EffectType}
    )

    Process {
        'Creating PSCustomObject: PSSailpointBeta => BetaConditionEffect' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "config" = ${Config}
            "effectType" = ${EffectType}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to ConditionEffect<PSCustomObject>

.DESCRIPTION

Convert from JSON to ConditionEffect<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

ConditionEffect<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpointBeta => BetaConditionEffect' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

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

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

        $PSO = [PSCustomObject]@{
            "config" = ${Config}
            "effectType" = ${EffectType}
        }

        return $PSO
    }

}