Model/SODViolationReopenedPayload.ps1
|
# # Identity Security Cloud API - Triggers # 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 JSON body delivered for the **SODViolationReopened** webhook. .PARAMETER Created When the violation record was created. .PARAMETER Modified When the violation was last modified. .PARAMETER Id Violation ID. .PARAMETER LastEvaluatedDate When the violation was last evaluated. .PARAMETER Level Violation severity level. .PARAMETER Name Human-readable violation name. .PARAMETER Owner No description available. .PARAMETER Policy No description available. .PARAMETER PreviousStatus Violation status before the reopen. .PARAMETER CurrentStatus Violation status after the reopen. .PARAMETER Target No description available. .PARAMETER Reason Why the violation was reopened. .OUTPUTS SODViolationReopenedPayload<PSCustomObject> #> function Initialize-SODViolationReopenedPayload { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Created}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Modified}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${LastEvaluatedDate}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Level}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Owner}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Policy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${PreviousStatus}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${CurrentStatus}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Target}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("Conflicting Criteria Updated", "Applied Control Expired")] [String] ${Reason} ) Process { 'Creating PSCustomObject: PSSailpoint.Triggers => SODViolationReopenedPayload' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "created" = ${Created} "modified" = ${Modified} "id" = ${Id} "lastEvaluatedDate" = ${LastEvaluatedDate} "level" = ${Level} "name" = ${Name} "owner" = ${Owner} "policy" = ${Policy} "previousStatus" = ${PreviousStatus} "currentStatus" = ${CurrentStatus} "target" = ${Target} "reason" = ${Reason} } return $PSO } } <# .SYNOPSIS Convert from JSON to SODViolationReopenedPayload<PSCustomObject> .DESCRIPTION Convert from JSON to SODViolationReopenedPayload<PSCustomObject> .PARAMETER Json Json object .OUTPUTS SODViolationReopenedPayload<PSCustomObject> #> function ConvertFrom-JsonToSODViolationReopenedPayload { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Triggers => SODViolationReopenedPayload' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in SODViolationReopenedPayload $AllProperties = ("created", "modified", "id", "lastEvaluatedDate", "level", "name", "owner", "policy", "previousStatus", "currentStatus", "target", "reason") 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 "created"))) { #optional property not found $Created = $null } else { $Created = $JsonParameters.PSobject.Properties["created"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "modified"))) { #optional property not found $Modified = $null } else { $Modified = $JsonParameters.PSobject.Properties["modified"].value } 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 "lastEvaluatedDate"))) { #optional property not found $LastEvaluatedDate = $null } else { $LastEvaluatedDate = $JsonParameters.PSobject.Properties["lastEvaluatedDate"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "level"))) { #optional property not found $Level = $null } else { $Level = $JsonParameters.PSobject.Properties["level"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "owner"))) { #optional property not found $Owner = $null } else { $Owner = $JsonParameters.PSobject.Properties["owner"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "policy"))) { #optional property not found $Policy = $null } else { $Policy = $JsonParameters.PSobject.Properties["policy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "previousStatus"))) { #optional property not found $PreviousStatus = $null } else { $PreviousStatus = $JsonParameters.PSobject.Properties["previousStatus"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "currentStatus"))) { #optional property not found $CurrentStatus = $null } else { $CurrentStatus = $JsonParameters.PSobject.Properties["currentStatus"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "target"))) { #optional property not found $Target = $null } else { $Target = $JsonParameters.PSobject.Properties["target"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reason"))) { #optional property not found $Reason = $null } else { $Reason = $JsonParameters.PSobject.Properties["reason"].value } $PSO = [PSCustomObject]@{ "created" = ${Created} "modified" = ${Modified} "id" = ${Id} "lastEvaluatedDate" = ${LastEvaluatedDate} "level" = ${Level} "name" = ${Name} "owner" = ${Owner} "policy" = ${Policy} "previousStatus" = ${PreviousStatus} "currentStatus" = ${CurrentStatus} "target" = ${Target} "reason" = ${Reason} } return $PSO } } |