Model/MachineAccountsSummary.ps1
|
# # SailPoint Identity Security API - Machine Accounts # 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 Counts of machine account candidates that are not yet linked to a machine identity, grouped by classification method. .PARAMETER Human Counts of candidates that are correlated to a human identity, with one entry each for the `CRITERIA`, `SOURCE` and `DISCOVERY` classification methods. .PARAMETER Uncorrelated Counts of candidates that are not correlated to any identity. This list has one entry, for the `DISCOVERY` classification method. .OUTPUTS MachineAccountsSummary<PSCustomObject> #> function Initialize-MachineAccountsSummary { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Human}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Uncorrelated} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineAccounts => MachineAccountsSummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "human" = ${Human} "uncorrelated" = ${Uncorrelated} } return $PSO } } <# .SYNOPSIS Convert from JSON to MachineAccountsSummary<PSCustomObject> .DESCRIPTION Convert from JSON to MachineAccountsSummary<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MachineAccountsSummary<PSCustomObject> #> function ConvertFrom-JsonToMachineAccountsSummary { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineAccounts => MachineAccountsSummary' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in MachineAccountsSummary $AllProperties = ("human", "uncorrelated") 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 "human"))) { #optional property not found $Human = $null } else { $Human = $JsonParameters.PSobject.Properties["human"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "uncorrelated"))) { #optional property not found $Uncorrelated = $null } else { $Uncorrelated = $JsonParameters.PSobject.Properties["uncorrelated"].value } $PSO = [PSCustomObject]@{ "human" = ${Human} "uncorrelated" = ${Uncorrelated} } return $PSO } } |