accounts/src/PSSailpoint.Accounts/Model/AccountV2.ps1
|
# # SailPoint Identity Security API - Accounts # Use these APIs to interact with the SailPoint Identity Security 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 record returned by the search-backed accounts list API. .PARAMETER Id System-generated unique ID of the account. .PARAMETER Name Display name of the account. .PARAMETER Uuid The unique ID of the account as determined by the account schema. .PARAMETER NativeIdentity The unique ID of the account generated by the source system. .PARAMETER Description A description of the account. .PARAMETER Type The account type. .PARAMETER Disabled Indicates if the account is currently disabled. .PARAMETER Locked Indicates if the account is currently locked. .PARAMETER HasEntitlements Indicates if the account has entitlements. .PARAMETER ManuallyCorrelated Indicates if the account has been manually correlated to an identity. .PARAMETER Correlated Indicates if this account is correlated to an identity. .PARAMETER Created Creation date of the account. .PARAMETER Modified Last modification date of the account. .PARAMETER Synced Date the account was last synced to the search index. .PARAMETER Source No description available. .PARAMETER Owner No description available. .PARAMETER Owners Identities who own this account. Never null; an empty array when the account has no owners. .PARAMETER CorrelatedIdentity No description available. .PARAMETER Recommendation No description available. .PARAMETER PrivilegeLevel No description available. .PARAMETER Attributes The account attributes that are aggregated. .PARAMETER Origin The origin of the account, either aggregated or provisioned. .PARAMETER ClassificationMethod Method used to classify the account. .PARAMETER SubType The account subtype. .PARAMETER CorrelatedEntities Correlated identities or machine identities associated with this account. Never null; an empty array when there are none. .PARAMETER Features Capability features of the owning source for this account. Never null; empty when unset. .OUTPUTS AccountV2<PSCustomObject> #> function Initialize-AccountV2 { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Uuid}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${NativeIdentity}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Description}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Disabled} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Locked} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${HasEntitlements} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${ManuallyCorrelated} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Correlated} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Created}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Modified}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Synced}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Source}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Owner}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Owners}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${CorrelatedIdentity}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Recommendation}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${PrivilegeLevel}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${Attributes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("AGGREGATED", "PROVISIONED")] [String] ${Origin}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("CRITERIA", "SOURCE", "DISCOVERY", "MANUAL", "MANUALLY_UNCLASSIFIED")] [String] ${ClassificationMethod}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SubType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${CorrelatedEntities}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Features} ) Process { 'Creating PSCustomObject: PSSailpoint.Accounts => AccountV2' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "uuid" = ${Uuid} "nativeIdentity" = ${NativeIdentity} "description" = ${Description} "type" = ${Type} "disabled" = ${Disabled} "locked" = ${Locked} "hasEntitlements" = ${HasEntitlements} "manuallyCorrelated" = ${ManuallyCorrelated} "correlated" = ${Correlated} "created" = ${Created} "modified" = ${Modified} "synced" = ${Synced} "source" = ${Source} "owner" = ${Owner} "owners" = ${Owners} "correlatedIdentity" = ${CorrelatedIdentity} "recommendation" = ${Recommendation} "privilegeLevel" = ${PrivilegeLevel} "attributes" = ${Attributes} "origin" = ${Origin} "classificationMethod" = ${ClassificationMethod} "subType" = ${SubType} "correlatedEntities" = ${CorrelatedEntities} "features" = ${Features} } return $PSO } } <# .SYNOPSIS Convert from JSON to AccountV2<PSCustomObject> .DESCRIPTION Convert from JSON to AccountV2<PSCustomObject> .PARAMETER Json Json object .OUTPUTS AccountV2<PSCustomObject> #> function ConvertFrom-JsonToAccountV2 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Accounts => AccountV2' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in AccountV2 $AllProperties = ("id", "name", "uuid", "nativeIdentity", "description", "type", "disabled", "locked", "hasEntitlements", "manuallyCorrelated", "correlated", "created", "modified", "synced", "source", "owner", "owners", "correlatedIdentity", "recommendation", "privilegeLevel", "attributes", "origin", "classificationMethod", "subType", "correlatedEntities", "features") 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 "uuid"))) { #optional property not found $Uuid = $null } else { $Uuid = $JsonParameters.PSobject.Properties["uuid"].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 "description"))) { #optional property not found $Description = $null } else { $Description = $JsonParameters.PSobject.Properties["description"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found $Type = $null } else { $Type = $JsonParameters.PSobject.Properties["type"].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 "hasEntitlements"))) { #optional property not found $HasEntitlements = $null } else { $HasEntitlements = $JsonParameters.PSobject.Properties["hasEntitlements"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "manuallyCorrelated"))) { #optional property not found $ManuallyCorrelated = $null } else { $ManuallyCorrelated = $JsonParameters.PSobject.Properties["manuallyCorrelated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "correlated"))) { #optional property not found $Correlated = $null } else { $Correlated = $JsonParameters.PSobject.Properties["correlated"].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 "source"))) { #optional property not found $Source = $null } else { $Source = $JsonParameters.PSobject.Properties["source"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "owner"))) { #optional property not found $Owner = $null } else { $Owner = $JsonParameters.PSobject.Properties["owner"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "owners"))) { #optional property not found $Owners = $null } else { $Owners = $JsonParameters.PSobject.Properties["owners"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "correlatedIdentity"))) { #optional property not found $CorrelatedIdentity = $null } else { $CorrelatedIdentity = $JsonParameters.PSobject.Properties["correlatedIdentity"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "recommendation"))) { #optional property not found $Recommendation = $null } else { $Recommendation = $JsonParameters.PSobject.Properties["recommendation"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "privilegeLevel"))) { #optional property not found $PrivilegeLevel = $null } else { $PrivilegeLevel = $JsonParameters.PSobject.Properties["privilegeLevel"].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 "origin"))) { #optional property not found $Origin = $null } else { $Origin = $JsonParameters.PSobject.Properties["origin"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "classificationMethod"))) { #optional property not found $ClassificationMethod = $null } else { $ClassificationMethod = $JsonParameters.PSobject.Properties["classificationMethod"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "subType"))) { #optional property not found $SubType = $null } else { $SubType = $JsonParameters.PSobject.Properties["subType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "correlatedEntities"))) { #optional property not found $CorrelatedEntities = $null } else { $CorrelatedEntities = $JsonParameters.PSobject.Properties["correlatedEntities"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "features"))) { #optional property not found $Features = $null } else { $Features = $JsonParameters.PSobject.Properties["features"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "uuid" = ${Uuid} "nativeIdentity" = ${NativeIdentity} "description" = ${Description} "type" = ${Type} "disabled" = ${Disabled} "locked" = ${Locked} "hasEntitlements" = ${HasEntitlements} "manuallyCorrelated" = ${ManuallyCorrelated} "correlated" = ${Correlated} "created" = ${Created} "modified" = ${Modified} "synced" = ${Synced} "source" = ${Source} "owner" = ${Owner} "owners" = ${Owners} "correlatedIdentity" = ${CorrelatedIdentity} "recommendation" = ${Recommendation} "privilegeLevel" = ${PrivilegeLevel} "attributes" = ${Attributes} "origin" = ${Origin} "classificationMethod" = ${ClassificationMethod} "subType" = ${SubType} "correlatedEntities" = ${CorrelatedEntities} "features" = ${Features} } return $PSO } } |