intelligence/src/PSSailpoint.Intelligence/Model/Intelnhirisksignalwire.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 One factor that contributes to the non-human identity risk level. .PARAMETER Id Stable identifier for this factor. .PARAMETER Name Short title of the factor. .PARAMETER Description Why this factor affects risk. .PARAMETER SeverityValue Severity of this factor. Omitted when not available. .PARAMETER LastReceivedAt When this factor was last observed. .PARAMETER Status State of the factor. .OUTPUTS Intelnhirisksignalwire<PSCustomObject> #> function Initialize-Intelnhirisksignalwire { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Description}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("LOW", "MEDIUM", "HIGH", "CRITICAL")] [String] ${SeverityValue}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.DateTime] ${LastReceivedAt}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Status} ) Process { 'Creating PSCustomObject: PSSailpoint.Intelligence => Intelnhirisksignalwire' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Id) { throw "invalid value for 'Id', 'Id' cannot be null." } if (!$Name) { throw "invalid value for 'Name', 'Name' cannot be null." } if (!$Description) { throw "invalid value for 'Description', 'Description' cannot be null." } if (!$LastReceivedAt) { throw "invalid value for 'LastReceivedAt', 'LastReceivedAt' cannot be null." } if (!$Status) { throw "invalid value for 'Status', 'Status' cannot be null." } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "description" = ${Description} "severityValue" = ${SeverityValue} "lastReceivedAt" = ${LastReceivedAt} "status" = ${Status} } return $PSO } } <# .SYNOPSIS Convert from JSON to Intelnhirisksignalwire<PSCustomObject> .DESCRIPTION Convert from JSON to Intelnhirisksignalwire<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Intelnhirisksignalwire<PSCustomObject> #> function ConvertFrom-JsonToIntelnhirisksignalwire { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Intelligence => Intelnhirisksignalwire' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Intelnhirisksignalwire $AllProperties = ("id", "name", "description", "severityValue", "lastReceivedAt", "status") 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 'id' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { throw "Error! JSON cannot be serialized due to the required property 'id' missing." } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { throw "Error! JSON cannot be serialized due to the required property 'name' missing." } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "description"))) { throw "Error! JSON cannot be serialized due to the required property 'description' missing." } else { $Description = $JsonParameters.PSobject.Properties["description"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastReceivedAt"))) { throw "Error! JSON cannot be serialized due to the required property 'lastReceivedAt' missing." } else { $LastReceivedAt = $JsonParameters.PSobject.Properties["lastReceivedAt"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { throw "Error! JSON cannot be serialized due to the required property 'status' missing." } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "severityValue"))) { #optional property not found $SeverityValue = $null } else { $SeverityValue = $JsonParameters.PSobject.Properties["severityValue"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "description" = ${Description} "severityValue" = ${SeverityValue} "lastReceivedAt" = ${LastReceivedAt} "status" = ${Status} } return $PSO } } |