v3/src/PSSailpoint/Model/IdentityDocument.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 Identity .PARAMETER Id The unique ID of the referenced object. .PARAMETER Name The human readable name of the referenced object. .PARAMETER Type No description available. .PARAMETER DisplayName The display name of the identity .PARAMETER FirstName The first name of the identity .PARAMETER LastName The last 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 IdentityDocument<PSCustomObject> #> function Initialize-IdentityDocument { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Type}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] [String] ${DisplayName}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] [String] ${FirstName}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] [String] ${LastName}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)] [String] ${Email}, [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Created}, [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Modified}, [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Synced}, [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true)] [String] ${Phone}, [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Inactive}, [Parameter(Position = 12, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Protected}, [Parameter(Position = 13, ValueFromPipelineByPropertyName = $true)] [String] ${Status}, [Parameter(Position = 14, ValueFromPipelineByPropertyName = $true)] [String] ${EmployeeNumber}, [Parameter(Position = 15, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Manager}, [Parameter(Position = 16, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsManager}, [Parameter(Position = 17, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${IdentityProfile}, [Parameter(Position = 18, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Source}, [Parameter(Position = 19, ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${Attributes}, [Parameter(Position = 20, ValueFromPipelineByPropertyName = $true)] [String] ${ProcessingState}, [Parameter(Position = 21, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ProcessingDetails}, [Parameter(Position = 22, ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Accounts}, [Parameter(Position = 23, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${AccountCount}, [Parameter(Position = 24, ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Apps}, [Parameter(Position = 25, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${AppCount}, [Parameter(Position = 26, ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Access}, [Parameter(Position = 27, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${AccessCount}, [Parameter(Position = 28, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${AccessProfileCount}, [Parameter(Position = 29, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${EntitlementCount}, [Parameter(Position = 30, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${RoleCount}, [Parameter(Position = 31, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Owns}, [Parameter(Position = 32, ValueFromPipelineByPropertyName = $true)] [String[]] ${Tags} ) Process { 'Creating PSCustomObject: PSSailpoint => IdentityDocument' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($null -eq $Id) { throw "invalid value for 'Id', 'Id' cannot be null." } if ($null -eq $Name) { throw "invalid value for 'Name', 'Name' cannot be null." } if ($null -eq $Type) { throw "invalid value for 'Type', 'Type' cannot be null." } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "_type" = ${Type} "displayName" = ${DisplayName} "firstName" = ${FirstName} "lastName" = ${LastName} "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 IdentityDocument<PSCustomObject> .DESCRIPTION Convert from JSON to IdentityDocument<PSCustomObject> .PARAMETER Json Json object .OUTPUTS IdentityDocument<PSCustomObject> #> function ConvertFrom-JsonToIdentityDocument { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint => IdentityDocument' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in IdentityDocument $AllProperties = ("id", "name", "_type", "displayName", "firstName", "lastName", "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 ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'id' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { throw "Error! JSON cannot be serialized due to the required property 'id' missing." } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { throw "Error! JSON cannot be serialized due to the required property 'name' missing." } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "_type"))) { throw "Error! JSON cannot be serialized due to the required property '_type' missing." } else { $Type = $JsonParameters.PSobject.Properties["_type"].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 "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 "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]@{ "id" = ${Id} "name" = ${Name} "_type" = ${Type} "displayName" = ${DisplayName} "firstName" = ${FirstName} "lastName" = ${LastName} "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 } } |