Model/InsightDetails.ps1
|
# # Identity Security Cloud API - Next Generation Certification Campaigns # 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 No description available. .PARAMETER Query Search query that selects the access included in the insight. .PARAMETER IdentityIdFilter Identity IDs used to limit the insight to specific identities. .PARAMETER Type No description available. .PARAMETER CampaignType The type of search campaign. Can only be IDENTITY .OUTPUTS InsightDetails<PSCustomObject> #> function Initialize-InsightDetails { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Query}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${IdentityIdFilter}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("ENTITLEMENT", "ACCESS_PROFILE", "ROLE")] [PSCustomObject] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("IDENTITY")] [String] ${CampaignType} ) Process { 'Creating PSCustomObject: PSSailpoint.GovCertification => InsightDetails' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "query" = ${Query} "identityIdFilter" = ${IdentityIdFilter} "type" = ${Type} "campaignType" = ${CampaignType} } return $PSO } } <# .SYNOPSIS Convert from JSON to InsightDetails<PSCustomObject> .DESCRIPTION Convert from JSON to InsightDetails<PSCustomObject> .PARAMETER Json Json object .OUTPUTS InsightDetails<PSCustomObject> #> function ConvertFrom-JsonToInsightDetails { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.GovCertification => InsightDetails' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in InsightDetails $AllProperties = ("query", "identityIdFilter", "type", "campaignType") 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 "query"))) { #optional property not found $Query = $null } else { $Query = $JsonParameters.PSobject.Properties["query"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "identityIdFilter"))) { #optional property not found $IdentityIdFilter = $null } else { $IdentityIdFilter = $JsonParameters.PSobject.Properties["identityIdFilter"].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 "campaignType"))) { #optional property not found $CampaignType = $null } else { $CampaignType = $JsonParameters.PSobject.Properties["campaignType"].value } $PSO = [PSCustomObject]@{ "query" = ${Query} "identityIdFilter" = ${IdentityIdFilter} "type" = ${Type} "campaignType" = ${CampaignType} } return $PSO } } |