notifications/src/PSSailpoint.Notifications/Model/Templatevariablesdto.ps1
|
# # Identity Security Cloud API - Notifications # 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 Variables available for use in a notification template. Variables can be template-specific (from domain events) or global (available to all templates like __recipient, __global, __util). .PARAMETER Key The notification template key. .PARAMETER Medium No description available. .PARAMETER GlobalVariables Global variables available to all templates for this tenant (e.g. __global.*, __recipient, __util.*, __dateTool.*, __esc.*). Includes both data variables and function-type helpers. .PARAMETER TemplateVariables Template-specific variables for the given key and medium (e.g. approverPath, requester, attributes). .OUTPUTS Templatevariablesdto<PSCustomObject> #> function Initialize-Templatevariablesdto { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Key}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("EMAIL", "SLACK", "TEAMS")] [PSCustomObject] ${Medium}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${GlobalVariables}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${TemplateVariables} ) Process { 'Creating PSCustomObject: PSSailpoint.Notifications => Templatevariablesdto' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "key" = ${Key} "medium" = ${Medium} "globalVariables" = ${GlobalVariables} "templateVariables" = ${TemplateVariables} } return $PSO } } <# .SYNOPSIS Convert from JSON to Templatevariablesdto<PSCustomObject> .DESCRIPTION Convert from JSON to Templatevariablesdto<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Templatevariablesdto<PSCustomObject> #> function ConvertFrom-JsonToTemplatevariablesdto { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Notifications => Templatevariablesdto' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Templatevariablesdto $AllProperties = ("key", "medium", "globalVariables", "templateVariables") 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 "key"))) { #optional property not found $Key = $null } else { $Key = $JsonParameters.PSobject.Properties["key"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "medium"))) { #optional property not found $Medium = $null } else { $Medium = $JsonParameters.PSobject.Properties["medium"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "globalVariables"))) { #optional property not found $GlobalVariables = $null } else { $GlobalVariables = $JsonParameters.PSobject.Properties["globalVariables"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "templateVariables"))) { #optional property not found $TemplateVariables = $null } else { $TemplateVariables = $JsonParameters.PSobject.Properties["templateVariables"].value } $PSO = [PSCustomObject]@{ "key" = ${Key} "medium" = ${Medium} "globalVariables" = ${GlobalVariables} "templateVariables" = ${TemplateVariables} } return $PSO } } |