machine-accounts/src/PSSailpoint.MachineAccounts/Model/MachineAccountAllOfRisk.ps1
|
# # Identity Security Cloud API - Machine Accounts # 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 Entro risk for this machine account. Present when Entro enrichment is enabled for the tenant. Null when no risk has been recorded. `score` stays null until a risk-engine projection exists. Read-only; written only by aggregation. This is separate from machine-identity SAF risk. .PARAMETER Score Risk score. Null for Entro-only severity. .PARAMETER Severity Risk severity. A null stored severity can render as UNKNOWN when that behavior is enabled. .OUTPUTS MachineAccountAllOfRisk<PSCustomObject> #> function Initialize-MachineAccountAllOfRisk { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Double]] ${Score}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("UNKNOWN", "LOW", "MEDIUM", "HIGH", "CRITICAL")] [String] ${Severity} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineAccounts => MachineAccountAllOfRisk' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "score" = ${Score} "severity" = ${Severity} } return $PSO } } <# .SYNOPSIS Convert from JSON to MachineAccountAllOfRisk<PSCustomObject> .DESCRIPTION Convert from JSON to MachineAccountAllOfRisk<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MachineAccountAllOfRisk<PSCustomObject> #> function ConvertFrom-JsonToMachineAccountAllOfRisk { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineAccounts => MachineAccountAllOfRisk' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in MachineAccountAllOfRisk $AllProperties = ("score", "severity") 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 "score"))) { #optional property not found $Score = $null } else { $Score = $JsonParameters.PSobject.Properties["score"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "severity"))) { #optional property not found $Severity = $null } else { $Severity = $JsonParameters.PSobject.Properties["severity"].value } $PSO = [PSCustomObject]@{ "score" = ${Score} "severity" = ${Severity} } return $PSO } } |