Model/Accountdetails.ps1

#
# Identity Security Cloud API - Account Deletion Requests
# 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: v1
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

Account Details

.PARAMETER Id
unique id of this object
.PARAMETER Name
No description available.
.PARAMETER AccountId
No description available.
.PARAMETER Description
No description available.
.PARAMETER NativeIdentity
No description available.
.PARAMETER Uuid
No description available.
.PARAMETER DisplayName
No description available.
.PARAMETER Disabled
No description available.
.PARAMETER Locked
No description available.
.PARAMETER Uncorrelated
No description available.
.PARAMETER SystemAccount
No description available.
.PARAMETER Authoritative
No description available.
.PARAMETER SupportsPasswordChange
No description available.
.PARAMETER Attributes
No description available.
.PARAMETER Application
No description available.
.PARAMETER Identity
No description available.
.PARAMETER Schema
No description available.
.PARAMETER PendingAccessRequestIds
No description available.
.PARAMETER Features
No description available.
.PARAMETER Meta
No description available.
.OUTPUTS

Accountdetails<PSCustomObject>
#>


function Initialize-Accountdetails {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Name},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AccountId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${NativeIdentity},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Uuid},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DisplayName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Disabled},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Locked},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Uncorrelated},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${SystemAccount},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Authoritative},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${SupportsPasswordChange},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Attributes},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Application},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Identity},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Schema},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${PendingAccessRequestIds},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("AUTHENTICATE", "COMPOSITE", "DIRECT_PERMISSIONS", "DISCOVER_SCHEMA", "ENABLE", "MANAGER_LOOKUP", "NO_RANDOM_ACCESS", "PROXY", "SEARCH", "TEMPLATE", "UNLOCK", "UNSTRUCTURED_TARGETS", "SHAREPOINT_TARGET", "PROVISIONING", "GROUP_PROVISIONING", "SYNC_PROVISIONING", "PASSWORD", "CURRENT_PASSWORD", "ACCOUNT_ONLY_REQUEST", "ADDITIONAL_ACCOUNT_REQUEST", "NO_AGGREGATION", "GROUPS_HAVE_MEMBERS", "NO_PERMISSIONS_PROVISIONING", "NO_GROUP_PERMISSIONS_PROVISIONING", "NO_UNSTRUCTURED_TARGETS_PROVISIONING", "NO_DIRECT_PERMISSIONS_PROVISIONING")]
        [String[]]
        ${Features},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Meta}
    )

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


        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "name" = ${Name}
            "accountId" = ${AccountId}
            "description" = ${Description}
            "nativeIdentity" = ${NativeIdentity}
            "uuid" = ${Uuid}
            "displayName" = ${DisplayName}
            "disabled" = ${Disabled}
            "locked" = ${Locked}
            "uncorrelated" = ${Uncorrelated}
            "systemAccount" = ${SystemAccount}
            "authoritative" = ${Authoritative}
            "supportsPasswordChange" = ${SupportsPasswordChange}
            "attributes" = ${Attributes}
            "application" = ${Application}
            "identity" = ${Identity}
            "schema" = ${Schema}
            "pendingAccessRequestIds" = ${PendingAccessRequestIds}
            "features" = ${Features}
            "meta" = ${Meta}
        }

        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-JsonToAccountdetails {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in Accountdetails
        $AllProperties = ("id", "name", "accountId", "description", "nativeIdentity", "uuid", "displayName", "disabled", "locked", "uncorrelated", "systemAccount", "authoritative", "supportsPasswordChange", "attributes", "application", "identity", "schema", "pendingAccessRequestIds", "features", "meta")
        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 "id"))) { #optional property not found
            $Id = $null
        } else {
            $Id = $JsonParameters.PSobject.Properties["id"].value
        }

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

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

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

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "uuid"))) { #optional property not found
            $Uuid = $null
        } else {
            $Uuid = $JsonParameters.PSobject.Properties["uuid"].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 "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 "uncorrelated"))) { #optional property not found
            $Uncorrelated = $null
        } else {
            $Uncorrelated = $JsonParameters.PSobject.Properties["uncorrelated"].value
        }

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

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

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "supportsPasswordChange"))) { #optional property not found
            $SupportsPasswordChange = $null
        } else {
            $SupportsPasswordChange = $JsonParameters.PSobject.Properties["supportsPasswordChange"].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 "application"))) { #optional property not found
            $Application = $null
        } else {
            $Application = $JsonParameters.PSobject.Properties["application"].value
        }

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "name" = ${Name}
            "accountId" = ${AccountId}
            "description" = ${Description}
            "nativeIdentity" = ${NativeIdentity}
            "uuid" = ${Uuid}
            "displayName" = ${DisplayName}
            "disabled" = ${Disabled}
            "locked" = ${Locked}
            "uncorrelated" = ${Uncorrelated}
            "systemAccount" = ${SystemAccount}
            "authoritative" = ${Authoritative}
            "supportsPasswordChange" = ${SupportsPasswordChange}
            "attributes" = ${Attributes}
            "application" = ${Application}
            "identity" = ${Identity}
            "schema" = ${Schema}
            "pendingAccessRequestIds" = ${PendingAccessRequestIds}
            "features" = ${Features}
            "meta" = ${Meta}
        }

        return $PSO
    }

}