reminder-escalations/src/PSSailpoint.ReminderEscalations/Model/Reminderescalationfallback.ps1
|
# # SailPoint Identity Security API - Reminder Escalations # Use these APIs to interact with the SailPoint Identity Security 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 Recipients used when an escalation cannot be delivered to its configured targets. .PARAMETER Targets Last-resort recipients for this fallback. Each entry resolves to a manager, identity, governance group, entitlement owner, or source owner. At least one target is required. .PARAMETER Template Notification template key. .OUTPUTS Reminderescalationfallback<PSCustomObject> #> function Initialize-Reminderescalationfallback { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Targets}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Template} ) Process { 'Creating PSCustomObject: PSSailpoint.ReminderEscalations => Reminderescalationfallback' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Targets) { throw "invalid value for 'Targets', 'Targets' cannot be null." } if ($Targets.length -lt 1) { throw "invalid value for 'Targets', number of items must be greater than or equal to 1." } if (!$Template) { throw "invalid value for 'Template', 'Template' cannot be null." } $PSO = [PSCustomObject]@{ "targets" = ${Targets} "template" = ${Template} } return $PSO } } <# .SYNOPSIS Convert from JSON to Reminderescalationfallback<PSCustomObject> .DESCRIPTION Convert from JSON to Reminderescalationfallback<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Reminderescalationfallback<PSCustomObject> #> function ConvertFrom-JsonToReminderescalationfallback { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.ReminderEscalations => Reminderescalationfallback' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Reminderescalationfallback $AllProperties = ("targets", "template") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'targets' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "targets"))) { throw "Error! JSON cannot be serialized due to the required property 'targets' missing." } else { $Targets = $JsonParameters.PSobject.Properties["targets"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "template"))) { throw "Error! JSON cannot be serialized due to the required property 'template' missing." } else { $Template = $JsonParameters.PSobject.Properties["template"].value } $PSO = [PSCustomObject]@{ "targets" = ${Targets} "template" = ${Template} } return $PSO } } |