v2026/src/PSSailpoint.V2026/Model/AccountDetails.ps1

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

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

Contains detailed information about an account, including identifiers, type, status, source, and ownership details.

.PARAMETER AccountId
ID of account
.PARAMETER AccountName
Account name
.PARAMETER AccountNativeIdentity
Native identity of account
.PARAMETER AccountUuid
UUID associated with account
.PARAMETER AccountType
Type of account
.PARAMETER AccountSubtypeId
Sub Type ID of account
.PARAMETER AccountSubtype
Subtype of account
.PARAMETER Description
Account Description
.PARAMETER SourceId
ID of source
.PARAMETER SourceName
Name of source
.PARAMETER HasEntitlements
Indicates entitlements assigned to identity or not
.PARAMETER Disabled
Indicates account is enabled/disabled
.PARAMETER Locked
Indicates account locked/unlocked
.PARAMETER OwnerIdentity
No description available.
.OUTPUTS

AccountDetails<PSCustomObject>
#>


function Initialize-V2026AccountDetails {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountNativeIdentity},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountUuid},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountType},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountSubtypeId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountSubtype},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${SourceId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${SourceName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${HasEntitlements} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Disabled} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Locked} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${OwnerIdentity}
    )

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


        $PSO = [PSCustomObject]@{
            "accountId" = ${AccountId}
            "accountName" = ${AccountName}
            "accountNativeIdentity" = ${AccountNativeIdentity}
            "accountUuid" = ${AccountUuid}
            "accountType" = ${AccountType}
            "accountSubtypeId" = ${AccountSubtypeId}
            "accountSubtype" = ${AccountSubtype}
            "description" = ${Description}
            "sourceId" = ${SourceId}
            "sourceName" = ${SourceName}
            "hasEntitlements" = ${HasEntitlements}
            "disabled" = ${Disabled}
            "locked" = ${Locked}
            "ownerIdentity" = ${OwnerIdentity}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to AccountDetails<PSCustomObject>

.DESCRIPTION

Convert from JSON to AccountDetails<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

AccountDetails<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2026AccountDetails
        $AllProperties = ("accountId", "accountName", "accountNativeIdentity", "accountUuid", "accountType", "accountSubtypeId", "accountSubtype", "description", "sourceId", "sourceName", "hasEntitlements", "disabled", "locked", "ownerIdentity")
        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 "accountId"))) { #optional property not found
            $AccountId = $null
        } else {
            $AccountId = $JsonParameters.PSobject.Properties["accountId"].value
        }

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

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

        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 "accountType"))) { #optional property not found
            $AccountType = $null
        } else {
            $AccountType = $JsonParameters.PSobject.Properties["accountType"].value
        }

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

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "accountId" = ${AccountId}
            "accountName" = ${AccountName}
            "accountNativeIdentity" = ${AccountNativeIdentity}
            "accountUuid" = ${AccountUuid}
            "accountType" = ${AccountType}
            "accountSubtypeId" = ${AccountSubtypeId}
            "accountSubtype" = ${AccountSubtype}
            "description" = ${Description}
            "sourceId" = ${SourceId}
            "sourceName" = ${SourceName}
            "hasEntitlements" = ${HasEntitlements}
            "disabled" = ${Disabled}
            "locked" = ${Locked}
            "ownerIdentity" = ${OwnerIdentity}
        }

        return $PSO
    }

}