v3/src/PSSailpoint/Model/ProvisioningConfig.ps1
# # IdentityNow V3 API # Use these APIs to interact with the IdentityNow 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: 3.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Specification of a Service Desk integration provisioning configuration. .PARAMETER UniversalManager Specifies whether this configuration is used to manage provisioning requests for all sources from the org. If true, no managedResourceRefs are allowed. .PARAMETER ManagedResourceRefs References to sources for the Service Desk integration template. May only be specified if universalManager is false. .PARAMETER PlanInitializerScript No description available. .OUTPUTS ProvisioningConfig<PSCustomObject> #> function Initialize-ProvisioningConfig { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${UniversalManager}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${ManagedResourceRefs}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${PlanInitializerScript} ) Process { 'Creating PSCustomObject: PSSailpoint => ProvisioningConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "universalManager" = ${UniversalManager} "managedResourceRefs" = ${ManagedResourceRefs} "planInitializerScript" = ${PlanInitializerScript} } return $PSO } } <# .SYNOPSIS Convert from JSON to ProvisioningConfig<PSCustomObject> .DESCRIPTION Convert from JSON to ProvisioningConfig<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ProvisioningConfig<PSCustomObject> #> function ConvertFrom-JsonToProvisioningConfig { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint => ProvisioningConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ProvisioningConfig $AllProperties = ("universalManager", "managedResourceRefs", "planInitializerScript") 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 "universalManager"))) { #optional property not found $UniversalManager = $null } else { $UniversalManager = $JsonParameters.PSobject.Properties["universalManager"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "managedResourceRefs"))) { #optional property not found $ManagedResourceRefs = $null } else { $ManagedResourceRefs = $JsonParameters.PSobject.Properties["managedResourceRefs"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "planInitializerScript"))) { #optional property not found $PlanInitializerScript = $null } else { $PlanInitializerScript = $JsonParameters.PSobject.Properties["planInitializerScript"].value } $PSO = [PSCustomObject]@{ "universalManager" = ${UniversalManager} "managedResourceRefs" = ${ManagedResourceRefs} "planInitializerScript" = ${PlanInitializerScript} } return $PSO } } |