v3/src/PSSailpoint/Model/AccountAllOf.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 SourceId The unique ID of the source this account belongs to .PARAMETER SourceName The display name of the source this account belongs to .PARAMETER IdentityId The unique ID of the identity this account is correlated to .PARAMETER Attributes The account attributes that are aggregated .PARAMETER Authoritative Indicates if this account is from an authoritative source .PARAMETER Description A description of the account .PARAMETER Disabled Indicates if the account is currently disabled .PARAMETER Locked Indicates if the account is currently locked .PARAMETER NativeIdentity The unique ID of the account generated by the source system .PARAMETER SystemAccount If true, this is a user account within IdentityNow. If false, this is an account from a source system. .PARAMETER Uncorrelated Indicates if this account is not correlated to an identity .PARAMETER Uuid The unique ID of the account as determined by the account schema .PARAMETER ManuallyCorrelated Indicates if the account has been manually correlated to an identity .PARAMETER HasEntitlements Indicates if the account has entitlements .OUTPUTS AccountAllOf<PSCustomObject> #> function Initialize-AccountAllOf { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [String] ${SourceId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [String] ${SourceName}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [String] ${IdentityId}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${Attributes}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] [Boolean] ${Authoritative}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] [String] ${Description}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)] [Boolean] ${Disabled}, [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)] [Boolean] ${Locked}, [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true)] [String] ${NativeIdentity}, [Parameter(Position = 9, ValueFromPipelineByPropertyName = $true)] [Boolean] ${SystemAccount}, [Parameter(Position = 10, ValueFromPipelineByPropertyName = $true)] [Boolean] ${Uncorrelated}, [Parameter(Position = 11, ValueFromPipelineByPropertyName = $true)] [String] ${Uuid}, [Parameter(Position = 12, ValueFromPipelineByPropertyName = $true)] [Boolean] ${ManuallyCorrelated}, [Parameter(Position = 13, ValueFromPipelineByPropertyName = $true)] [Boolean] ${HasEntitlements} ) Process { 'Creating PSCustomObject: PSSailpoint => AccountAllOf' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($null -eq $SourceId) { throw "invalid value for 'SourceId', 'SourceId' cannot be null." } if ($null -eq $SourceName) { throw "invalid value for 'SourceName', 'SourceName' cannot be null." } if ($null -eq $Attributes) { throw "invalid value for 'Attributes', 'Attributes' cannot be null." } if ($null -eq $Authoritative) { throw "invalid value for 'Authoritative', 'Authoritative' cannot be null." } if ($null -eq $Disabled) { throw "invalid value for 'Disabled', 'Disabled' cannot be null." } if ($null -eq $Locked) { throw "invalid value for 'Locked', 'Locked' cannot be null." } if ($null -eq $NativeIdentity) { throw "invalid value for 'NativeIdentity', 'NativeIdentity' cannot be null." } if ($null -eq $SystemAccount) { throw "invalid value for 'SystemAccount', 'SystemAccount' cannot be null." } if ($null -eq $Uncorrelated) { throw "invalid value for 'Uncorrelated', 'Uncorrelated' cannot be null." } if ($null -eq $ManuallyCorrelated) { throw "invalid value for 'ManuallyCorrelated', 'ManuallyCorrelated' cannot be null." } if ($null -eq $HasEntitlements) { throw "invalid value for 'HasEntitlements', 'HasEntitlements' cannot be null." } $PSO = [PSCustomObject]@{ "sourceId" = ${SourceId} "sourceName" = ${SourceName} "identityId" = ${IdentityId} "attributes" = ${Attributes} "authoritative" = ${Authoritative} "description" = ${Description} "disabled" = ${Disabled} "locked" = ${Locked} "nativeIdentity" = ${NativeIdentity} "systemAccount" = ${SystemAccount} "uncorrelated" = ${Uncorrelated} "uuid" = ${Uuid} "manuallyCorrelated" = ${ManuallyCorrelated} "hasEntitlements" = ${HasEntitlements} } return $PSO } } <# .SYNOPSIS Convert from JSON to AccountAllOf<PSCustomObject> .DESCRIPTION Convert from JSON to AccountAllOf<PSCustomObject> .PARAMETER Json Json object .OUTPUTS AccountAllOf<PSCustomObject> #> function ConvertFrom-JsonToAccountAllOf { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint => AccountAllOf' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in AccountAllOf $AllProperties = ("sourceId", "sourceName", "identityId", "attributes", "authoritative", "description", "disabled", "locked", "nativeIdentity", "systemAccount", "uncorrelated", "uuid", "manuallyCorrelated", "hasEntitlements") 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 'sourceId' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceId"))) { throw "Error! JSON cannot be serialized due to the required property 'sourceId' missing." } else { $SourceId = $JsonParameters.PSobject.Properties["sourceId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceName"))) { throw "Error! JSON cannot be serialized due to the required property 'sourceName' missing." } else { $SourceName = $JsonParameters.PSobject.Properties["sourceName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "attributes"))) { throw "Error! JSON cannot be serialized due to the required property 'attributes' missing." } else { $Attributes = $JsonParameters.PSobject.Properties["attributes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "authoritative"))) { throw "Error! JSON cannot be serialized due to the required property 'authoritative' missing." } else { $Authoritative = $JsonParameters.PSobject.Properties["authoritative"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "disabled"))) { throw "Error! JSON cannot be serialized due to the required property 'disabled' missing." } else { $Disabled = $JsonParameters.PSobject.Properties["disabled"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "locked"))) { throw "Error! JSON cannot be serialized due to the required property 'locked' missing." } else { $Locked = $JsonParameters.PSobject.Properties["locked"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "nativeIdentity"))) { throw "Error! JSON cannot be serialized due to the required property 'nativeIdentity' missing." } else { $NativeIdentity = $JsonParameters.PSobject.Properties["nativeIdentity"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "systemAccount"))) { throw "Error! JSON cannot be serialized due to the required property 'systemAccount' missing." } else { $SystemAccount = $JsonParameters.PSobject.Properties["systemAccount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "uncorrelated"))) { throw "Error! JSON cannot be serialized due to the required property 'uncorrelated' missing." } else { $Uncorrelated = $JsonParameters.PSobject.Properties["uncorrelated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "manuallyCorrelated"))) { throw "Error! JSON cannot be serialized due to the required property 'manuallyCorrelated' missing." } else { $ManuallyCorrelated = $JsonParameters.PSobject.Properties["manuallyCorrelated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "hasEntitlements"))) { throw "Error! JSON cannot be serialized due to the required property 'hasEntitlements' missing." } else { $HasEntitlements = $JsonParameters.PSobject.Properties["hasEntitlements"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "identityId"))) { #optional property not found $IdentityId = $null } else { $IdentityId = $JsonParameters.PSobject.Properties["identityId"].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 "uuid"))) { #optional property not found $Uuid = $null } else { $Uuid = $JsonParameters.PSobject.Properties["uuid"].value } $PSO = [PSCustomObject]@{ "sourceId" = ${SourceId} "sourceName" = ${SourceName} "identityId" = ${IdentityId} "attributes" = ${Attributes} "authoritative" = ${Authoritative} "description" = ${Description} "disabled" = ${Disabled} "locked" = ${Locked} "nativeIdentity" = ${NativeIdentity} "systemAccount" = ${SystemAccount} "uncorrelated" = ${Uncorrelated} "uuid" = ${Uuid} "manuallyCorrelated" = ${ManuallyCorrelated} "hasEntitlements" = ${HasEntitlements} } return $PSO } } |