v3/src/PSSailpoint/Model/BaseAccount.ps1
# # Identity Security Cloud V3 API # 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: 3.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Id The unique ID of the referenced object. .PARAMETER Name The human readable name of the referenced object. .PARAMETER AccountId Account ID. .PARAMETER Source No description available. .PARAMETER Disabled Indicates whether the account is disabled. .PARAMETER Locked Indicates whether the account is locked. .PARAMETER Privileged Indicates whether the account is privileged. .PARAMETER ManuallyCorrelated Indicates whether the account has been manually correlated to an identity. .PARAMETER PasswordLastSet A date-time in ISO-8601 format .PARAMETER EntitlementAttributes Map or dictionary of key/value pairs. .PARAMETER Created ISO-8601 date-time referring to the time when the object was created. .OUTPUTS BaseAccount<PSCustomObject> #> function Initialize-BaseAccount { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${AccountId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Source}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Disabled} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Locked} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Privileged} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${ManuallyCorrelated} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${PasswordLastSet}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${EntitlementAttributes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Created} ) Process { 'Creating PSCustomObject: PSSailpoint => BaseAccount' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "accountId" = ${AccountId} "source" = ${Source} "disabled" = ${Disabled} "locked" = ${Locked} "privileged" = ${Privileged} "manuallyCorrelated" = ${ManuallyCorrelated} "passwordLastSet" = ${PasswordLastSet} "entitlementAttributes" = ${EntitlementAttributes} "created" = ${Created} } return $PSO } } <# .SYNOPSIS Convert from JSON to BaseAccount<PSCustomObject> .DESCRIPTION Convert from JSON to BaseAccount<PSCustomObject> .PARAMETER Json Json object .OUTPUTS BaseAccount<PSCustomObject> #> function ConvertFrom-JsonToBaseAccount { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint => BaseAccount' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BaseAccount $AllProperties = ("id", "name", "accountId", "source", "disabled", "locked", "privileged", "manuallyCorrelated", "passwordLastSet", "entitlementAttributes", "created") 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 "source"))) { #optional property not found $Source = $null } else { $Source = $JsonParameters.PSobject.Properties["source"].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 "privileged"))) { #optional property not found $Privileged = $null } else { $Privileged = $JsonParameters.PSobject.Properties["privileged"].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 "passwordLastSet"))) { #optional property not found $PasswordLastSet = $null } else { $PasswordLastSet = $JsonParameters.PSobject.Properties["passwordLastSet"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "entitlementAttributes"))) { #optional property not found $EntitlementAttributes = $null } else { $EntitlementAttributes = $JsonParameters.PSobject.Properties["entitlementAttributes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "created"))) { #optional property not found $Created = $null } else { $Created = $JsonParameters.PSobject.Properties["created"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "accountId" = ${AccountId} "source" = ${Source} "disabled" = ${Disabled} "locked" = ${Locked} "privileged" = ${Privileged} "manuallyCorrelated" = ${ManuallyCorrelated} "passwordLastSet" = ${PasswordLastSet} "entitlementAttributes" = ${EntitlementAttributes} "created" = ${Created} } return $PSO } } |