v3/src/PSSailpoint/Model/IdentityDocumentAllOf.ps1

#
# IdentityNow V3 API
# Use these APIs to interact with the IdentityNow 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: 3.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER FirstName
The first name of the identity
.PARAMETER LastName
The last name of the identity
.PARAMETER DisplayName
The display name of the identity
.PARAMETER Email
The identity's primary email address
.PARAMETER Created
A date-time in ISO-8601 format
.PARAMETER Modified
A date-time in ISO-8601 format
.PARAMETER Synced
A date-time in ISO-8601 format
.PARAMETER Phone
The phone number of the identity
.PARAMETER Inactive
Indicates if the identity is inactive
.PARAMETER Protected
No description available.
.PARAMETER Status
The identity's status in SailPoint
.PARAMETER EmployeeNumber
No description available.
.PARAMETER Manager
No description available.
.PARAMETER IsManager
Indicates if this identity is a manager of other identities
.PARAMETER IdentityProfile
No description available.
.PARAMETER Source
No description available.
.PARAMETER Attributes
a map or dictionary of key/value pairs
.PARAMETER ProcessingState
No description available.
.PARAMETER ProcessingDetails
No description available.
.PARAMETER Accounts
List of accounts associated with the identity
.PARAMETER AccountCount
Number of accounts associated with the identity
.PARAMETER Apps
The list of applications the identity has access to
.PARAMETER AppCount
The number of applications the identity has access to
.PARAMETER Access
The list of access items assigned to the identity
.PARAMETER AccessCount
The number of access items assigned to the identity
.PARAMETER AccessProfileCount
The number of access profiles assigned to the identity
.PARAMETER EntitlementCount
The number of entitlements assigned to the identity
.PARAMETER RoleCount
The number of roles assigned to the identity
.PARAMETER Owns
No description available.
.PARAMETER Tags
No description available.
.OUTPUTS

IdentityDocumentAllOf<PSCustomObject>
#>


function Initialize-IdentityDocumentAllOf {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${FirstName},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${LastName},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DisplayName},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Email},
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${Created},
        [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${Modified},
        [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${Synced},
        [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Phone},
        [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Inactive},
        [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Protected},
        [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Status},
        [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${EmployeeNumber},
        [Parameter(Position = 12, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Manager},
        [Parameter(Position = 13, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${IsManager},
        [Parameter(Position = 14, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${IdentityProfile},
        [Parameter(Position = 15, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Source},
        [Parameter(Position = 16, ValueFromPipelineByPropertyName = $true)]
        [System.Collections.Hashtable]
        ${Attributes},
        [Parameter(Position = 17, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ProcessingState},
        [Parameter(Position = 18, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ProcessingDetails},
        [Parameter(Position = 19, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${Accounts},
        [Parameter(Position = 20, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccountCount},
        [Parameter(Position = 21, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${Apps},
        [Parameter(Position = 22, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AppCount},
        [Parameter(Position = 23, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${Access},
        [Parameter(Position = 24, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccessCount},
        [Parameter(Position = 25, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccessProfileCount},
        [Parameter(Position = 26, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${EntitlementCount},
        [Parameter(Position = 27, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${RoleCount},
        [Parameter(Position = 28, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Owns},
        [Parameter(Position = 29, ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${Tags}
    )

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


        $PSO = [PSCustomObject]@{
            "firstName" = ${FirstName}
            "lastName" = ${LastName}
            "displayName" = ${DisplayName}
            "email" = ${Email}
            "created" = ${Created}
            "modified" = ${Modified}
            "synced" = ${Synced}
            "phone" = ${Phone}
            "inactive" = ${Inactive}
            "protected" = ${Protected}
            "status" = ${Status}
            "employeeNumber" = ${EmployeeNumber}
            "manager" = ${Manager}
            "isManager" = ${IsManager}
            "identityProfile" = ${IdentityProfile}
            "source" = ${Source}
            "attributes" = ${Attributes}
            "processingState" = ${ProcessingState}
            "processingDetails" = ${ProcessingDetails}
            "accounts" = ${Accounts}
            "accountCount" = ${AccountCount}
            "apps" = ${Apps}
            "appCount" = ${AppCount}
            "access" = ${Access}
            "accessCount" = ${AccessCount}
            "accessProfileCount" = ${AccessProfileCount}
            "entitlementCount" = ${EntitlementCount}
            "roleCount" = ${RoleCount}
            "owns" = ${Owns}
            "tags" = ${Tags}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to IdentityDocumentAllOf<PSCustomObject>

.DESCRIPTION

Convert from JSON to IdentityDocumentAllOf<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

IdentityDocumentAllOf<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in IdentityDocumentAllOf
        $AllProperties = ("firstName", "lastName", "displayName", "email", "created", "modified", "synced", "phone", "inactive", "protected", "status", "employeeNumber", "manager", "isManager", "identityProfile", "source", "attributes", "processingState", "processingDetails", "accounts", "accountCount", "apps", "appCount", "access", "accessCount", "accessProfileCount", "entitlementCount", "roleCount", "owns", "tags")
        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 "firstName"))) { #optional property not found
            $FirstName = $null
        } else {
            $FirstName = $JsonParameters.PSobject.Properties["firstName"].value
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "firstName" = ${FirstName}
            "lastName" = ${LastName}
            "displayName" = ${DisplayName}
            "email" = ${Email}
            "created" = ${Created}
            "modified" = ${Modified}
            "synced" = ${Synced}
            "phone" = ${Phone}
            "inactive" = ${Inactive}
            "protected" = ${Protected}
            "status" = ${Status}
            "employeeNumber" = ${EmployeeNumber}
            "manager" = ${Manager}
            "isManager" = ${IsManager}
            "identityProfile" = ${IdentityProfile}
            "source" = ${Source}
            "attributes" = ${Attributes}
            "processingState" = ${ProcessingState}
            "processingDetails" = ${ProcessingDetails}
            "accounts" = ${Accounts}
            "accountCount" = ${AccountCount}
            "apps" = ${Apps}
            "appCount" = ${AppCount}
            "access" = ${Access}
            "accessCount" = ${AccessCount}
            "accessProfileCount" = ${AccessProfileCount}
            "entitlementCount" = ${EntitlementCount}
            "roleCount" = ${RoleCount}
            "owns" = ${Owns}
            "tags" = ${Tags}
        }

        return $PSO
    }

}