Model/SourceClassificationStatusAllOfCounts.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

A map containing numbers relevant to the source classification process

.PARAMETER EXPECTED
total number of source accounts
.PARAMETER RECEIVED
number of accounts that have been sent for processing (should be the same as expected when all accounts are collected)
.PARAMETER COMPLETED
number of accounts that have been classified
.OUTPUTS

SourceClassificationStatusAllOfCounts<PSCustomObject>
#>


function Initialize-V2025SourceClassificationStatusAllOfCounts {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [Int64]
        ${EXPECTED},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [Int64]
        ${RECEIVED},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [Int64]
        ${COMPLETED}
    )

    Process {
        'Creating PSCustomObject: PSSailpoint.V2025 => V2025SourceClassificationStatusAllOfCounts' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        if (!$EXPECTED) {
            throw "invalid value for 'EXPECTED', 'EXPECTED' cannot be null."
        }

        if (!$RECEIVED) {
            throw "invalid value for 'RECEIVED', 'RECEIVED' cannot be null."
        }

        if (!$COMPLETED) {
            throw "invalid value for 'COMPLETED', 'COMPLETED' cannot be null."
        }


        $PSO = [PSCustomObject]@{
            "EXPECTED" = ${EXPECTED}
            "RECEIVED" = ${RECEIVED}
            "COMPLETED" = ${COMPLETED}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to SourceClassificationStatusAllOfCounts<PSCustomObject>

.DESCRIPTION

Convert from JSON to SourceClassificationStatusAllOfCounts<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

SourceClassificationStatusAllOfCounts<PSCustomObject>
#>

function ConvertFrom-V2025JsonToSourceClassificationStatusAllOfCounts {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025SourceClassificationStatusAllOfCounts' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2025SourceClassificationStatusAllOfCounts
        $AllProperties = ("EXPECTED", "RECEIVED", "COMPLETED")
        foreach ($name in $JsonParameters.PsObject.Properties.Name) {
            if (!($AllProperties.Contains($name))) {
                throw "Error! JSON key '$name' not found in the properties: $($AllProperties)"
            }
        }

        If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json
            throw "Error! Empty JSON cannot be serialized due to the required property 'EXPECTED' missing."
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "EXPECTED"))) {
            throw "Error! JSON cannot be serialized due to the required property 'EXPECTED' missing."
        } else {
            $EXPECTED = $JsonParameters.PSobject.Properties["EXPECTED"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "RECEIVED"))) {
            throw "Error! JSON cannot be serialized due to the required property 'RECEIVED' missing."
        } else {
            $RECEIVED = $JsonParameters.PSobject.Properties["RECEIVED"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "COMPLETED"))) {
            throw "Error! JSON cannot be serialized due to the required property 'COMPLETED' missing."
        } else {
            $COMPLETED = $JsonParameters.PSobject.Properties["COMPLETED"].value
        }

        $PSO = [PSCustomObject]@{
            "EXPECTED" = ${EXPECTED}
            "RECEIVED" = ${RECEIVED}
            "COMPLETED" = ${COMPLETED}
        }

        return $PSO
    }

}