Model/Entitlementrecommendationrecord.ps1
|
# # Identity Security Cloud API - Suggested Entitlement Description # 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: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION A unified entitlement recommendation record representing either a SED (Suggested Entitlement Description) or a privilege recommendation. .PARAMETER RecordType The type of recommendation. ""SED"" indicates a suggested description recommendation; ""privilege"" indicates a privilege-level recommendation. .PARAMETER Id The unique identifier for this recommendation record. .PARAMETER Attribute The entitlement attribute name (e.g. ""groups""). .PARAMETER DisplayName The human-readable display name of the entitlement. .PARAMETER Name The internal name of the entitlement. .PARAMETER SourceId The ID of the source that owns this entitlement. .PARAMETER SourceName The display name of the source that owns this entitlement. .PARAMETER Status The current review status of the recommendation. .PARAMETER Type The entitlement type (e.g. ""group""). .PARAMETER Value The entitlement value or identifier. .PARAMETER Description The current description of the entitlement, if one exists. .PARAMETER SuggestedDescription The AI-generated suggested description for the entitlement (SED records only). .PARAMETER Privilege The current privilege level assigned to the entitlement. .PARAMETER SuggestedPrivilege The AI-suggested privilege level for the entitlement (privilege records only). .PARAMETER ApprovedBy The ID of the identity who approved this recommendation. .PARAMETER ApprovedType How the recommendation was approved (e.g. ""direct""). .PARAMETER ApprovedWhen The timestamp when the recommendation was approved. .PARAMETER LlmBatchCreatedAt The timestamp when the LLM batch that generated this recommendation was created. .OUTPUTS Entitlementrecommendationrecord<PSCustomObject> #> function Initialize-Entitlementrecommendationrecord { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("SED", "privilege")] [String] ${RecordType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Attribute}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DisplayName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Value}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Description}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SuggestedDescription}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Privilege}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SuggestedPrivilege}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ApprovedBy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ApprovedType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${ApprovedWhen}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${LlmBatchCreatedAt} ) Process { 'Creating PSCustomObject: PSSailpoint.SuggestedEntitlementDescription => Entitlementrecommendationrecord' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "recordType" = ${RecordType} "id" = ${Id} "attribute" = ${Attribute} "displayName" = ${DisplayName} "name" = ${Name} "sourceId" = ${SourceId} "sourceName" = ${SourceName} "status" = ${Status} "type" = ${Type} "value" = ${Value} "description" = ${Description} "suggestedDescription" = ${SuggestedDescription} "privilege" = ${Privilege} "suggestedPrivilege" = ${SuggestedPrivilege} "approvedBy" = ${ApprovedBy} "approvedType" = ${ApprovedType} "approvedWhen" = ${ApprovedWhen} "llmBatchCreatedAt" = ${LlmBatchCreatedAt} } return $PSO } } <# .SYNOPSIS Convert from JSON to Entitlementrecommendationrecord<PSCustomObject> .DESCRIPTION Convert from JSON to Entitlementrecommendationrecord<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Entitlementrecommendationrecord<PSCustomObject> #> function ConvertFrom-JsonToEntitlementrecommendationrecord { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.SuggestedEntitlementDescription => Entitlementrecommendationrecord' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Entitlementrecommendationrecord $AllProperties = ("recordType", "id", "attribute", "displayName", "name", "sourceId", "sourceName", "status", "type", "value", "description", "suggestedDescription", "privilege", "suggestedPrivilege", "approvedBy", "approvedType", "approvedWhen", "llmBatchCreatedAt") 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 "recordType"))) { #optional property not found $RecordType = $null } else { $RecordType = $JsonParameters.PSobject.Properties["recordType"].value } 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 "attribute"))) { #optional property not found $Attribute = $null } else { $Attribute = $JsonParameters.PSobject.Properties["attribute"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "displayName"))) { #optional property not found $DisplayName = $null } else { $DisplayName = $JsonParameters.PSobject.Properties["displayName"].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 "sourceId"))) { #optional property not found $SourceId = $null } else { $SourceId = $JsonParameters.PSobject.Properties["sourceId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceName"))) { #optional property not found $SourceName = $null } else { $SourceName = $JsonParameters.PSobject.Properties["sourceName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].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 "value"))) { #optional property not found $Value = $null } else { $Value = $JsonParameters.PSobject.Properties["value"].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 "suggestedDescription"))) { #optional property not found $SuggestedDescription = $null } else { $SuggestedDescription = $JsonParameters.PSobject.Properties["suggestedDescription"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "privilege"))) { #optional property not found $Privilege = $null } else { $Privilege = $JsonParameters.PSobject.Properties["privilege"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "suggestedPrivilege"))) { #optional property not found $SuggestedPrivilege = $null } else { $SuggestedPrivilege = $JsonParameters.PSobject.Properties["suggestedPrivilege"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvedBy"))) { #optional property not found $ApprovedBy = $null } else { $ApprovedBy = $JsonParameters.PSobject.Properties["approvedBy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvedType"))) { #optional property not found $ApprovedType = $null } else { $ApprovedType = $JsonParameters.PSobject.Properties["approvedType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvedWhen"))) { #optional property not found $ApprovedWhen = $null } else { $ApprovedWhen = $JsonParameters.PSobject.Properties["approvedWhen"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "llmBatchCreatedAt"))) { #optional property not found $LlmBatchCreatedAt = $null } else { $LlmBatchCreatedAt = $JsonParameters.PSobject.Properties["llmBatchCreatedAt"].value } $PSO = [PSCustomObject]@{ "recordType" = ${RecordType} "id" = ${Id} "attribute" = ${Attribute} "displayName" = ${DisplayName} "name" = ${Name} "sourceId" = ${SourceId} "sourceName" = ${SourceName} "status" = ${Status} "type" = ${Type} "value" = ${Value} "description" = ${Description} "suggestedDescription" = ${SuggestedDescription} "privilege" = ${Privilege} "suggestedPrivilege" = ${SuggestedPrivilege} "approvedBy" = ${ApprovedBy} "approvedType" = ${ApprovedType} "approvedWhen" = ${ApprovedWhen} "llmBatchCreatedAt" = ${LlmBatchCreatedAt} } return $PSO } } |