Model/MachineIdentityAgentCounts.ps1
|
# # SailPoint Identity Security API - Machine Identities # 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 Tenant-wide summary counts for AI agent machine identities. .PARAMETER AgentCount Total number of AI agents. .PARAMETER UnsanctionedAgentCount Number of AI agents that are not sanctioned. .PARAMETER Discovered No description available. .PARAMETER RiskSeverity No description available. .PARAMETER Ownership No description available. .OUTPUTS MachineIdentityAgentCounts<PSCustomObject> #> function Initialize-MachineIdentityAgentCounts { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${AgentCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${UnsanctionedAgentCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Discovered}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${RiskSeverity}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Ownership} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineIdentities => MachineIdentityAgentCounts' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "agentCount" = ${AgentCount} "unsanctionedAgentCount" = ${UnsanctionedAgentCount} "discovered" = ${Discovered} "riskSeverity" = ${RiskSeverity} "ownership" = ${Ownership} } return $PSO } } <# .SYNOPSIS Convert from JSON to MachineIdentityAgentCounts<PSCustomObject> .DESCRIPTION Convert from JSON to MachineIdentityAgentCounts<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MachineIdentityAgentCounts<PSCustomObject> #> function ConvertFrom-JsonToMachineIdentityAgentCounts { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineIdentities => MachineIdentityAgentCounts' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in MachineIdentityAgentCounts $AllProperties = ("agentCount", "unsanctionedAgentCount", "discovered", "riskSeverity", "ownership") 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 "agentCount"))) { #optional property not found $AgentCount = $null } else { $AgentCount = $JsonParameters.PSobject.Properties["agentCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "unsanctionedAgentCount"))) { #optional property not found $UnsanctionedAgentCount = $null } else { $UnsanctionedAgentCount = $JsonParameters.PSobject.Properties["unsanctionedAgentCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "discovered"))) { #optional property not found $Discovered = $null } else { $Discovered = $JsonParameters.PSobject.Properties["discovered"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "riskSeverity"))) { #optional property not found $RiskSeverity = $null } else { $RiskSeverity = $JsonParameters.PSobject.Properties["riskSeverity"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ownership"))) { #optional property not found $Ownership = $null } else { $Ownership = $JsonParameters.PSobject.Properties["ownership"].value } $PSO = [PSCustomObject]@{ "agentCount" = ${AgentCount} "unsanctionedAgentCount" = ${UnsanctionedAgentCount} "discovered" = ${Discovered} "riskSeverity" = ${RiskSeverity} "ownership" = ${Ownership} } return $PSO } } |