beta/src/PSSailpointBeta/Model/EntitlementRequestConfig1.ps1
# # IdentityNow Beta API # Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. 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.1.0-beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER AllowEntitlementRequest Flag for allowing entitlement request. .PARAMETER RequestCommentsRequired Flag for requiring comments while submitting an entitlement request. .PARAMETER DeniedCommentsRequired Flag for requiring comments while rejecting an entitlement request. .PARAMETER GrantRequestApprovalSchemes Approval schemes for granting entitlement request. This can be empty if no approval is needed. Multiple schemes must be comma-separated. The valid schemes are ""entitlementOwner"", ""sourceOwner"", ""manager"" and ""workgroup:{id}"". Multiple workgroups (governance groups) can be used. .OUTPUTS EntitlementRequestConfig1<PSCustomObject> #> function Initialize-BetaEntitlementRequestConfig1 { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${AllowEntitlementRequest}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${RequestCommentsRequired} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${DeniedCommentsRequired} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${GrantRequestApprovalSchemes} = "sourceOwner" ) Process { 'Creating PSCustomObject: PSSailpointBeta => BetaEntitlementRequestConfig1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "allowEntitlementRequest" = ${AllowEntitlementRequest} "requestCommentsRequired" = ${RequestCommentsRequired} "deniedCommentsRequired" = ${DeniedCommentsRequired} "grantRequestApprovalSchemes" = ${GrantRequestApprovalSchemes} } return $PSO } } <# .SYNOPSIS Convert from JSON to EntitlementRequestConfig1<PSCustomObject> .DESCRIPTION Convert from JSON to EntitlementRequestConfig1<PSCustomObject> .PARAMETER Json Json object .OUTPUTS EntitlementRequestConfig1<PSCustomObject> #> function ConvertFrom-BetaJsonToEntitlementRequestConfig1 { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpointBeta => BetaEntitlementRequestConfig1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaEntitlementRequestConfig1 $AllProperties = ("allowEntitlementRequest", "requestCommentsRequired", "deniedCommentsRequired", "grantRequestApprovalSchemes") 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 "allowEntitlementRequest"))) { #optional property not found $AllowEntitlementRequest = $null } else { $AllowEntitlementRequest = $JsonParameters.PSobject.Properties["allowEntitlementRequest"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requestCommentsRequired"))) { #optional property not found $RequestCommentsRequired = $null } else { $RequestCommentsRequired = $JsonParameters.PSobject.Properties["requestCommentsRequired"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "deniedCommentsRequired"))) { #optional property not found $DeniedCommentsRequired = $null } else { $DeniedCommentsRequired = $JsonParameters.PSobject.Properties["deniedCommentsRequired"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "grantRequestApprovalSchemes"))) { #optional property not found $GrantRequestApprovalSchemes = $null } else { $GrantRequestApprovalSchemes = $JsonParameters.PSobject.Properties["grantRequestApprovalSchemes"].value } $PSO = [PSCustomObject]@{ "allowEntitlementRequest" = ${AllowEntitlementRequest} "requestCommentsRequired" = ${RequestCommentsRequired} "deniedCommentsRequired" = ${DeniedCommentsRequired} "grantRequestApprovalSchemes" = ${GrantRequestApprovalSchemes} } return $PSO } } |