v2024/src/PSSailpoint.V2024/Model/AccountItemRef.ps1

#
# Identity Security Cloud V2024 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: v2024
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER AccountUuid
The uuid for the account, available under the 'objectguid' attribute
.PARAMETER NativeIdentity
The 'distinguishedName' attribute for the account
.OUTPUTS

AccountItemRef<PSCustomObject>
#>


function Initialize-V2024AccountItemRef {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountUuid},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${NativeIdentity}
    )

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


        $PSO = [PSCustomObject]@{
            "accountUuid" = ${AccountUuid}
            "nativeIdentity" = ${NativeIdentity}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to AccountItemRef<PSCustomObject>

.DESCRIPTION

Convert from JSON to AccountItemRef<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

AccountItemRef<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2024AccountItemRef
        $AllProperties = ("accountUuid", "nativeIdentity")
        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 "accountUuid"))) { #optional property not found
            $AccountUuid = $null
        } else {
            $AccountUuid = $JsonParameters.PSobject.Properties["accountUuid"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "nativeIdentity"))) { #optional property not found
            $NativeIdentity = $null
        } else {
            $NativeIdentity = $JsonParameters.PSobject.Properties["nativeIdentity"].value
        }

        $PSO = [PSCustomObject]@{
            "accountUuid" = ${AccountUuid}
            "nativeIdentity" = ${NativeIdentity}
        }

        return $PSO
    }

}