machine-identities/src/PSSailpoint.MachineIdentities/Model/UnsanctionedApplicationAnomalySummary.ps1
|
# # Identity Security Cloud API - Machine Identities # 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 Aggregate counts of machine identities flagged with unsanctioned-application anomalies, used to power the Unsanctioned Agents card. .PARAMETER AnomalyType The anomaly type these counts describe. Always unsanctioned_app for this endpoint. .PARAMETER AgentCount Number of distinct agents with at least one unsanctioned-application anomaly. .PARAMETER UserCount Number of distinct owners (users) associated with unsanctioned-application anomalies. .PARAMETER EventCount Total number of unsanctioned-application anomaly records. .OUTPUTS UnsanctionedApplicationAnomalySummary<PSCustomObject> #> function Initialize-UnsanctionedApplicationAnomalySummary { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${AnomalyType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${AgentCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${UserCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${EventCount} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineIdentities => UnsanctionedApplicationAnomalySummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "anomalyType" = ${AnomalyType} "agentCount" = ${AgentCount} "userCount" = ${UserCount} "eventCount" = ${EventCount} } return $PSO } } <# .SYNOPSIS Convert from JSON to UnsanctionedApplicationAnomalySummary<PSCustomObject> .DESCRIPTION Convert from JSON to UnsanctionedApplicationAnomalySummary<PSCustomObject> .PARAMETER Json Json object .OUTPUTS UnsanctionedApplicationAnomalySummary<PSCustomObject> #> function ConvertFrom-JsonToUnsanctionedApplicationAnomalySummary { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineIdentities => UnsanctionedApplicationAnomalySummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in UnsanctionedApplicationAnomalySummary $AllProperties = ("anomalyType", "agentCount", "userCount", "eventCount") 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 "anomalyType"))) { #optional property not found $AnomalyType = $null } else { $AnomalyType = $JsonParameters.PSobject.Properties["anomalyType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "agentCount"))) { #optional property not found $AgentCount = $null } else { $AgentCount = $JsonParameters.PSobject.Properties["agentCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "userCount"))) { #optional property not found $UserCount = $null } else { $UserCount = $JsonParameters.PSobject.Properties["userCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "eventCount"))) { #optional property not found $EventCount = $null } else { $EventCount = $JsonParameters.PSobject.Properties["eventCount"].value } $PSO = [PSCustomObject]@{ "anomalyType" = ${AnomalyType} "agentCount" = ${AgentCount} "userCount" = ${UserCount} "eventCount" = ${EventCount} } return $PSO } } |