v2025/src/PSSailpoint.V2025/Model/HealthEvent.ps1
|
# # Identity Security Cloud V2025 API # 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: v2025 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Individual error or warning event .PARAMETER DetailedMessage Description of the issue .PARAMETER Uuid Unique identifier for the health event .PARAMETER Url Optional URL associated with the issue .PARAMETER Timestamp Time when the event occurred .PARAMETER LastNotifiedTimeStamp Last time notification was sent for this issue .PARAMETER CpuUtilizationPercentage CPU usage percentage .PARAMETER FreeSpacePercentage Free memory percentage .OUTPUTS HealthEvent<PSCustomObject> #> function Initialize-V2025HealthEvent { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DetailedMessage}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Uuid}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Url}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Timestamp}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${LastNotifiedTimeStamp}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Decimal]] ${CpuUtilizationPercentage}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Decimal]] ${FreeSpacePercentage} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025HealthEvent' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "detailedMessage" = ${DetailedMessage} "uuid" = ${Uuid} "url" = ${Url} "timestamp" = ${Timestamp} "lastNotifiedTimeStamp" = ${LastNotifiedTimeStamp} "cpuUtilizationPercentage" = ${CpuUtilizationPercentage} "freeSpacePercentage" = ${FreeSpacePercentage} } return $PSO } } <# .SYNOPSIS Convert from JSON to HealthEvent<PSCustomObject> .DESCRIPTION Convert from JSON to HealthEvent<PSCustomObject> .PARAMETER Json Json object .OUTPUTS HealthEvent<PSCustomObject> #> function ConvertFrom-V2025JsonToHealthEvent { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025HealthEvent' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025HealthEvent $AllProperties = ("detailedMessage", "uuid", "url", "timestamp", "lastNotifiedTimeStamp", "cpuUtilizationPercentage", "freeSpacePercentage") 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 "detailedMessage"))) { #optional property not found $DetailedMessage = $null } else { $DetailedMessage = $JsonParameters.PSobject.Properties["detailedMessage"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "uuid"))) { #optional property not found $Uuid = $null } else { $Uuid = $JsonParameters.PSobject.Properties["uuid"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "url"))) { #optional property not found $Url = $null } else { $Url = $JsonParameters.PSobject.Properties["url"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "timestamp"))) { #optional property not found $Timestamp = $null } else { $Timestamp = $JsonParameters.PSobject.Properties["timestamp"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastNotifiedTimeStamp"))) { #optional property not found $LastNotifiedTimeStamp = $null } else { $LastNotifiedTimeStamp = $JsonParameters.PSobject.Properties["lastNotifiedTimeStamp"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "cpuUtilizationPercentage"))) { #optional property not found $CpuUtilizationPercentage = $null } else { $CpuUtilizationPercentage = $JsonParameters.PSobject.Properties["cpuUtilizationPercentage"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "freeSpacePercentage"))) { #optional property not found $FreeSpacePercentage = $null } else { $FreeSpacePercentage = $JsonParameters.PSobject.Properties["freeSpacePercentage"].value } $PSO = [PSCustomObject]@{ "detailedMessage" = ${DetailedMessage} "uuid" = ${Uuid} "url" = ${Url} "timestamp" = ${Timestamp} "lastNotifiedTimeStamp" = ${LastNotifiedTimeStamp} "cpuUtilizationPercentage" = ${CpuUtilizationPercentage} "freeSpacePercentage" = ${FreeSpacePercentage} } return $PSO } } |