access-request-approvals/src/PSSailpoint.AccessRequestApprovals/Model/PendingApprovalForm.ps1
|
# # Identity Security Cloud API - Access Request Approvals # 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 FormDefinitionId ID of the form definition that was completed for this item. .PARAMETER FormInstanceId ID of the completed form instance. .PARAMETER FormData Key-value pairs (form field technical name to value) from the completed form instance. .PARAMETER FormElements Optional form element definitions when present. Shape follows the form instance payload. .PARAMETER FormConditions Optional conditional display rules when present. Shape follows the form instance payload; do not depend on a fixed condition schema in this API. .PARAMETER FormInstanceInputs Optional inputs passed into the form instance when present. Copied from the form instance payload as-is. .OUTPUTS PendingApprovalForm<PSCustomObject> #> function Initialize-PendingApprovalForm { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${FormDefinitionId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${FormInstanceId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${FormData}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable[]] ${FormElements}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable[]] ${FormConditions}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${FormInstanceInputs} ) Process { 'Creating PSCustomObject: PSSailpoint.AccessRequestApprovals => PendingApprovalForm' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "formDefinitionId" = ${FormDefinitionId} "formInstanceId" = ${FormInstanceId} "formData" = ${FormData} "formElements" = ${FormElements} "formConditions" = ${FormConditions} "formInstanceInputs" = ${FormInstanceInputs} } return $PSO } } <# .SYNOPSIS Convert from JSON to PendingApprovalForm<PSCustomObject> .DESCRIPTION Convert from JSON to PendingApprovalForm<PSCustomObject> .PARAMETER Json Json object .OUTPUTS PendingApprovalForm<PSCustomObject> #> function ConvertFrom-JsonToPendingApprovalForm { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.AccessRequestApprovals => PendingApprovalForm' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PendingApprovalForm $AllProperties = ("formDefinitionId", "formInstanceId", "formData", "formElements", "formConditions", "formInstanceInputs") 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 "formDefinitionId"))) { #optional property not found $FormDefinitionId = $null } else { $FormDefinitionId = $JsonParameters.PSobject.Properties["formDefinitionId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "formInstanceId"))) { #optional property not found $FormInstanceId = $null } else { $FormInstanceId = $JsonParameters.PSobject.Properties["formInstanceId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "formData"))) { #optional property not found $FormData = $null } else { $FormData = $JsonParameters.PSobject.Properties["formData"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "formElements"))) { #optional property not found $FormElements = $null } else { $FormElements = $JsonParameters.PSobject.Properties["formElements"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "formConditions"))) { #optional property not found $FormConditions = $null } else { $FormConditions = $JsonParameters.PSobject.Properties["formConditions"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "formInstanceInputs"))) { #optional property not found $FormInstanceInputs = $null } else { $FormInstanceInputs = $JsonParameters.PSobject.Properties["formInstanceInputs"].value } $PSO = [PSCustomObject]@{ "formDefinitionId" = ${FormDefinitionId} "formInstanceId" = ${FormInstanceId} "formData" = ${FormData} "formElements" = ${FormElements} "formConditions" = ${FormConditions} "formInstanceInputs" = ${FormInstanceInputs} } return $PSO } } |