Model/ResourceModel.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 No description available. .PARAMETER Id The unique identifier for the resource. .PARAMETER Name The display name or label for the resource. .PARAMETER FullPath The full path to the resource within the system or application. .PARAMETER ApplicationId The unique identifier of the application to which this resource belongs. .PARAMETER Type No description available. .PARAMETER Owners A list of UUIDs representing the owners of the resource. .OUTPUTS ResourceModel<PSCustomObject> #> function Initialize-V2025ResourceModel { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${FullPath}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${ApplicationId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "18", "24", "25", "30", "801", "908", "909", "910", "912", "913", "914", "950", "951", "952", "953", "1000", "1100", "1101", "1200", "1201", "1202", "1203", "1204", "1205", "1206", "1207", "1208", "1209", "1210", "1211", "1212", "1213", "1214", "1215", "1216", "1300", "1301", "1302", "1303", "1304", "1305", "1400", "1401", "1402", "1403", "1404", "1405", "1406", "1407", "1408", "1409", "1410", "1411")] [PSCustomObject] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Owners} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025ResourceModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "fullPath" = ${FullPath} "applicationId" = ${ApplicationId} "type" = ${Type} "owners" = ${Owners} } return $PSO } } <# .SYNOPSIS Convert from JSON to ResourceModel<PSCustomObject> .DESCRIPTION Convert from JSON to ResourceModel<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ResourceModel<PSCustomObject> #> function ConvertFrom-V2025JsonToResourceModel { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025ResourceModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025ResourceModel $AllProperties = ("id", "name", "fullPath", "applicationId", "type", "owners") 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 "fullPath"))) { #optional property not found $FullPath = $null } else { $FullPath = $JsonParameters.PSobject.Properties["fullPath"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "applicationId"))) { #optional property not found $ApplicationId = $null } else { $ApplicationId = $JsonParameters.PSobject.Properties["applicationId"].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 "owners"))) { #optional property not found $Owners = $null } else { $Owners = $JsonParameters.PSobject.Properties["owners"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "fullPath" = ${FullPath} "applicationId" = ${ApplicationId} "type" = ${Type} "owners" = ${Owners} } return $PSO } } |