Model/NotificationActionWorkflowActionEmailAttributes.ps1
|
# # NERM API # The NERM API accesss and modifies resources in your environment. # Version: 1.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Id the id. .PARAMETER WorkflowActionId the id of the workflow action. .PARAMETER EmailId the id of the email. .PARAMETER Type the type of email. .OUTPUTS NotificationActionWorkflowActionEmailAttributes<PSCustomObject> #> function Initialize-NERMNotificationActionWorkflowActionEmailAttributes { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${WorkflowActionId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${EmailId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("StandardEmail")] [String] ${Type} ) Process { 'Creating PSCustomObject: PSSailpoint.NERM => NERMNotificationActionWorkflowActionEmailAttributes' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "workflow_action_id" = ${WorkflowActionId} "email_id" = ${EmailId} "type" = ${Type} } return $PSO } } <# .SYNOPSIS Convert from JSON to NotificationActionWorkflowActionEmailAttributes<PSCustomObject> .DESCRIPTION Convert from JSON to NotificationActionWorkflowActionEmailAttributes<PSCustomObject> .PARAMETER Json Json object .OUTPUTS NotificationActionWorkflowActionEmailAttributes<PSCustomObject> #> function ConvertFrom-NERMJsonToNotificationActionWorkflowActionEmailAttributes { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.NERM => NERMNotificationActionWorkflowActionEmailAttributes' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in NERMNotificationActionWorkflowActionEmailAttributes $AllProperties = ("id", "workflow_action_id", "email_id", "type") 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 "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "workflow_action_id"))) { #optional property not found $WorkflowActionId = $null } else { $WorkflowActionId = $JsonParameters.PSobject.Properties["workflow_action_id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "email_id"))) { #optional property not found $EmailId = $null } else { $EmailId = $JsonParameters.PSobject.Properties["email_id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found $Type = $null } else { $Type = $JsonParameters.PSobject.Properties["type"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "workflow_action_id" = ${WorkflowActionId} "email_id" = ${EmailId} "type" = ${Type} } return $PSO } } |