Model/AccountV2.ps1
|
# # Identity Security Cloud V2025 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: v2025 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Details about the account. .PARAMETER Id The unique identifier of the account. .PARAMETER Name The name of the account. .PARAMETER NativeIdentity The unique ID of the account generated by the source system. .PARAMETER Uuid The unique ID associated with this account. .PARAMETER Correlated Indicates if the account is correlated to an identity. .PARAMETER IsMachine Indicates if the account is a machine account. .PARAMETER Origin The origin of the account. .PARAMETER Attributes The attributes of the account. The contents of attributes depends on the account schema for the source. .OUTPUTS AccountV2<PSCustomObject> #> function Initialize-V2025AccountV2 { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${NativeIdentity}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Uuid}, [Parameter(ValueFromPipelineByPropertyName = $true)] [Boolean] ${Correlated}, [Parameter(ValueFromPipelineByPropertyName = $true)] [Boolean] ${IsMachine}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Origin}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${Attributes} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025AccountV2' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Id) { throw "invalid value for 'Id', 'Id' cannot be null." } if (!$Name) { throw "invalid value for 'Name', 'Name' cannot be null." } if (!$NativeIdentity) { throw "invalid value for 'NativeIdentity', 'NativeIdentity' cannot be null." } if (!$Correlated) { throw "invalid value for 'Correlated', 'Correlated' cannot be null." } if (!$IsMachine) { throw "invalid value for 'IsMachine', 'IsMachine' cannot be null." } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "nativeIdentity" = ${NativeIdentity} "uuid" = ${Uuid} "correlated" = ${Correlated} "isMachine" = ${IsMachine} "origin" = ${Origin} "attributes" = ${Attributes} } 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-V2025JsonToAccountV2 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025AccountV2' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025AccountV2 $AllProperties = ("id", "name", "nativeIdentity", "uuid", "correlated", "isMachine", "origin", "attributes") 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 "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 "uuid"))) { throw "Error! JSON cannot be serialized due to the required property 'uuid' missing." } else { $Uuid = $JsonParameters.PSobject.Properties["uuid"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "correlated"))) { throw "Error! JSON cannot be serialized due to the required property 'correlated' missing." } else { $Correlated = $JsonParameters.PSobject.Properties["correlated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isMachine"))) { throw "Error! JSON cannot be serialized due to the required property 'isMachine' missing." } else { $IsMachine = $JsonParameters.PSobject.Properties["isMachine"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "origin"))) { throw "Error! JSON cannot be serialized due to the required property 'origin' missing." } else { $Origin = $JsonParameters.PSobject.Properties["origin"].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 } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "nativeIdentity" = ${NativeIdentity} "uuid" = ${Uuid} "correlated" = ${Correlated} "isMachine" = ${IsMachine} "origin" = ${Origin} "attributes" = ${Attributes} } return $PSO } } |