v2025/src/PSSailpoint.V2025/Model/PrivilegeCriteriaConfigDTO.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 Id of the task which is executing the bulk update. .PARAMETER SourceId The Id of the source that the criteria configuration is applied to. .PARAMETER Config The configuration settings for privilege criteria evaluation. .PARAMETER Created The date and time when the privilege criteria configuration was created. .PARAMETER Modified The date and time when the privilege criteria configuration was last modified. .OUTPUTS PrivilegeCriteriaConfigDTO<PSCustomObject> #> function Initialize-V2025PrivilegeCriteriaConfigDTO { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Config}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Created}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Modified} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025PrivilegeCriteriaConfigDTO' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$SourceId -and $SourceId.length -gt 32) { throw "invalid value for 'SourceId', the character length must be smaller than or equal to 32." } if (!$SourceId -and $SourceId.length -lt 32) { throw "invalid value for 'SourceId', the character length must be great than or equal to 32." } $PSO = [PSCustomObject]@{ "id" = ${Id} "sourceId" = ${SourceId} "config" = ${Config} "created" = ${Created} "modified" = ${Modified} } return $PSO } } <# .SYNOPSIS Convert from JSON to PrivilegeCriteriaConfigDTO<PSCustomObject> .DESCRIPTION Convert from JSON to PrivilegeCriteriaConfigDTO<PSCustomObject> .PARAMETER Json Json object .OUTPUTS PrivilegeCriteriaConfigDTO<PSCustomObject> #> function ConvertFrom-V2025JsonToPrivilegeCriteriaConfigDTO { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025PrivilegeCriteriaConfigDTO' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025PrivilegeCriteriaConfigDTO $AllProperties = ("id", "sourceId", "config", "created", "modified") 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 "sourceId"))) { #optional property not found $SourceId = $null } else { $SourceId = $JsonParameters.PSobject.Properties["sourceId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "config"))) { #optional property not found $Config = $null } else { $Config = $JsonParameters.PSobject.Properties["config"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "created"))) { #optional property not found $Created = $null } else { $Created = $JsonParameters.PSobject.Properties["created"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "modified"))) { #optional property not found $Modified = $null } else { $Modified = $JsonParameters.PSobject.Properties["modified"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "sourceId" = ${SourceId} "config" = ${Config} "created" = ${Created} "modified" = ${Modified} } return $PSO } } |