generic-request-approval-config/src/PSSailpoint.GenericRequestApprovalConfig/Model/GenericRequestApprovalActionConfig.ps1
|
# # Identity Security Cloud API - Generic Request Approval Config # 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 The approval setting for one action. It is either an empty object, which inherits the organization-level approval configuration, an APPROVAL setting with `approvers` and `comments`, or a WORKFLOW setting with `workflowId`. .PARAMETER Scheme How the request is approved. Omitted when the action inherits the organization-level configuration. .PARAMETER Approvers APPROVAL scheme only. A comma-separated list of approver tokens: `sourceOwner`, `manager`, `machineIdentityPrimaryOwner`, `machineIdentitySecondaryOwners`, `machineIdentityAllOwners`, `workgroup:{governanceGroupId}`, and `identity:{identityId}`. `accountOwner` is also allowed for the SUBTYPE DELETE action. .PARAMETER Comments APPROVAL scheme only. When approvers must comment: on both decisions (ALL), on approval only (APPROVAL), on rejection only (REJECTION), or never (OFF). .PARAMETER WorkflowId WORKFLOW scheme only. The ID of the workflow that approves the request. .OUTPUTS GenericRequestApprovalActionConfig<PSCustomObject> #> function Initialize-GenericRequestApprovalActionConfig { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("APPROVAL", "WORKFLOW")] [String] ${Scheme}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Approvers}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("ALL", "APPROVAL", "REJECTION", "OFF")] [String] ${Comments}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${WorkflowId} ) Process { 'Creating PSCustomObject: PSSailpoint.GenericRequestApprovalConfig => GenericRequestApprovalActionConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "scheme" = ${Scheme} "approvers" = ${Approvers} "comments" = ${Comments} "workflowId" = ${WorkflowId} } return $PSO } } <# .SYNOPSIS Convert from JSON to GenericRequestApprovalActionConfig<PSCustomObject> .DESCRIPTION Convert from JSON to GenericRequestApprovalActionConfig<PSCustomObject> .PARAMETER Json Json object .OUTPUTS GenericRequestApprovalActionConfig<PSCustomObject> #> function ConvertFrom-JsonToGenericRequestApprovalActionConfig { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.GenericRequestApprovalConfig => GenericRequestApprovalActionConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in GenericRequestApprovalActionConfig $AllProperties = ("scheme", "approvers", "comments", "workflowId") 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 "scheme"))) { #optional property not found $Scheme = $null } else { $Scheme = $JsonParameters.PSobject.Properties["scheme"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvers"))) { #optional property not found $Approvers = $null } else { $Approvers = $JsonParameters.PSobject.Properties["approvers"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "comments"))) { #optional property not found $Comments = $null } else { $Comments = $JsonParameters.PSobject.Properties["comments"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "workflowId"))) { #optional property not found $WorkflowId = $null } else { $WorkflowId = $JsonParameters.PSobject.Properties["workflowId"].value } $PSO = [PSCustomObject]@{ "scheme" = ${Scheme} "approvers" = ${Approvers} "comments" = ${Comments} "workflowId" = ${WorkflowId} } return $PSO } } |