v3/src/PSSailpoint/Model/AccessRequestConfig.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 No description available. .PARAMETER ApprovalsMustBeExternal If true, then approvals must be processed by external system. .PARAMETER AutoApprovalEnabled If true and requester and reviewer are the same, then automatically approve the approval. .PARAMETER RequestOnBehalfOfConfig No description available. .PARAMETER ApprovalReminderAndEscalationConfig No description available. .PARAMETER EntitlementRequestConfig No description available. .OUTPUTS AccessRequestConfig<PSCustomObject> #> function Initialize-AccessRequestConfig { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${ApprovalsMustBeExternal}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${AutoApprovalEnabled}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${RequestOnBehalfOfConfig}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ApprovalReminderAndEscalationConfig}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${EntitlementRequestConfig} ) Process { 'Creating PSCustomObject: PSSailpoint => AccessRequestConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "approvalsMustBeExternal" = ${ApprovalsMustBeExternal} "autoApprovalEnabled" = ${AutoApprovalEnabled} "requestOnBehalfOfConfig" = ${RequestOnBehalfOfConfig} "approvalReminderAndEscalationConfig" = ${ApprovalReminderAndEscalationConfig} "entitlementRequestConfig" = ${EntitlementRequestConfig} } return $PSO } } <# .SYNOPSIS Convert from JSON to AccessRequestConfig<PSCustomObject> .DESCRIPTION Convert from JSON to AccessRequestConfig<PSCustomObject> .PARAMETER Json Json object .OUTPUTS AccessRequestConfig<PSCustomObject> #> function ConvertFrom-JsonToAccessRequestConfig { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint => AccessRequestConfig' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in AccessRequestConfig $AllProperties = ("approvalsMustBeExternal", "autoApprovalEnabled", "requestOnBehalfOfConfig", "approvalReminderAndEscalationConfig", "entitlementRequestConfig") 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 "approvalsMustBeExternal"))) { #optional property not found $ApprovalsMustBeExternal = $null } else { $ApprovalsMustBeExternal = $JsonParameters.PSobject.Properties["approvalsMustBeExternal"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "autoApprovalEnabled"))) { #optional property not found $AutoApprovalEnabled = $null } else { $AutoApprovalEnabled = $JsonParameters.PSobject.Properties["autoApprovalEnabled"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requestOnBehalfOfConfig"))) { #optional property not found $RequestOnBehalfOfConfig = $null } else { $RequestOnBehalfOfConfig = $JsonParameters.PSobject.Properties["requestOnBehalfOfConfig"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "approvalReminderAndEscalationConfig"))) { #optional property not found $ApprovalReminderAndEscalationConfig = $null } else { $ApprovalReminderAndEscalationConfig = $JsonParameters.PSobject.Properties["approvalReminderAndEscalationConfig"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "entitlementRequestConfig"))) { #optional property not found $EntitlementRequestConfig = $null } else { $EntitlementRequestConfig = $JsonParameters.PSobject.Properties["entitlementRequestConfig"].value } $PSO = [PSCustomObject]@{ "approvalsMustBeExternal" = ${ApprovalsMustBeExternal} "autoApprovalEnabled" = ${AutoApprovalEnabled} "requestOnBehalfOfConfig" = ${RequestOnBehalfOfConfig} "approvalReminderAndEscalationConfig" = ${ApprovalReminderAndEscalationConfig} "entitlementRequestConfig" = ${EntitlementRequestConfig} } return $PSO } } |