beta/src/PSSailpointBeta/Model/RecommendationRequestDto.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 Requests
No description available.
.PARAMETER ExcludeInterpretations
Exclude interpretations in the response if ""true"". Return interpretations in the response if this attribute is not specified.
.PARAMETER IncludeTranslationMessages
When set to true, the calling system uses the translated messages for the specified language
.PARAMETER IncludeDebugInformation
Returns the recommender calculations if set to true
.PARAMETER PrescribeMode
When set to true, uses prescribedRulesRecommenderConfig to get identity attributes and peer group threshold instead of standard config.
.OUTPUTS

RecommendationRequestDto<PSCustomObject>
#>


function Initialize-BetaRecommendationRequestDto {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${Requests},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${ExcludeInterpretations} = $false,
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${IncludeTranslationMessages} = $false,
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${IncludeDebugInformation} = $false,
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${PrescribeMode} = $false
    )

    Process {
        'Creating PSCustomObject: PSSailpointBeta => BetaRecommendationRequestDto' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "requests" = ${Requests}
            "excludeInterpretations" = ${ExcludeInterpretations}
            "includeTranslationMessages" = ${IncludeTranslationMessages}
            "includeDebugInformation" = ${IncludeDebugInformation}
            "prescribeMode" = ${PrescribeMode}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to RecommendationRequestDto<PSCustomObject>

.DESCRIPTION

Convert from JSON to RecommendationRequestDto<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

RecommendationRequestDto<PSCustomObject>
#>

function ConvertFrom-BetaJsonToRecommendationRequestDto {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: PSSailpointBeta => BetaRecommendationRequestDto' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in BetaRecommendationRequestDto
        $AllProperties = ("requests", "excludeInterpretations", "includeTranslationMessages", "includeDebugInformation", "prescribeMode")
        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 "requests"))) { #optional property not found
            $Requests = $null
        } else {
            $Requests = $JsonParameters.PSobject.Properties["requests"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "excludeInterpretations"))) { #optional property not found
            $ExcludeInterpretations = $null
        } else {
            $ExcludeInterpretations = $JsonParameters.PSobject.Properties["excludeInterpretations"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "includeTranslationMessages"))) { #optional property not found
            $IncludeTranslationMessages = $null
        } else {
            $IncludeTranslationMessages = $JsonParameters.PSobject.Properties["includeTranslationMessages"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "includeDebugInformation"))) { #optional property not found
            $IncludeDebugInformation = $null
        } else {
            $IncludeDebugInformation = $JsonParameters.PSobject.Properties["includeDebugInformation"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "prescribeMode"))) { #optional property not found
            $PrescribeMode = $null
        } else {
            $PrescribeMode = $JsonParameters.PSobject.Properties["prescribeMode"].value
        }

        $PSO = [PSCustomObject]@{
            "requests" = ${Requests}
            "excludeInterpretations" = ${ExcludeInterpretations}
            "includeTranslationMessages" = ${IncludeTranslationMessages}
            "includeDebugInformation" = ${IncludeDebugInformation}
            "prescribeMode" = ${PrescribeMode}
        }

        return $PSO
    }

}