intelligence/src/PSSailpoint.Intelligence/Model/Intelnhirisk.ps1
|
# # SailPoint Identity Security API - Intelligence # 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 Overall risk level for this non-human identity. Null when the identity is not scored (for example, risk is not licensed, scoring is not yet available, or the identity was removed). .PARAMETER Severity Risk band for the identity. .PARAMETER LastModified When the risk level last changed. Omitted when not available. .OUTPUTS Intelnhirisk<PSCustomObject> #> function Initialize-Intelnhirisk { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("LOW", "MEDIUM", "HIGH", "CRITICAL")] [String] ${Severity}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${LastModified} ) Process { 'Creating PSCustomObject: PSSailpoint.Intelligence => Intelnhirisk' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "severity" = ${Severity} "lastModified" = ${LastModified} } return $PSO } } <# .SYNOPSIS Convert from JSON to Intelnhirisk<PSCustomObject> .DESCRIPTION Convert from JSON to Intelnhirisk<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Intelnhirisk<PSCustomObject> #> function ConvertFrom-JsonToIntelnhirisk { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Intelligence => Intelnhirisk' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Intelnhirisk $AllProperties = ("severity", "lastModified") 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 "severity"))) { #optional property not found $Severity = $null } else { $Severity = $JsonParameters.PSobject.Properties["severity"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastModified"))) { #optional property not found $LastModified = $null } else { $LastModified = $JsonParameters.PSobject.Properties["lastModified"].value } $PSO = [PSCustomObject]@{ "severity" = ${Severity} "lastModified" = ${LastModified} } return $PSO } } |