Model/Rolelistfilterdtov2.ps1

#
# SailPoint Identity Security API - Roles
# Use these APIs to interact with the SailPoint Identity Security 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

Request body for filtering roles by metadata and filter expression, including privilegeLevel.effective.

.PARAMETER Filters
Filter results using the standard syntax described in [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, in, sw, co* **created**: *gt, lt, ge, le* **modified**: *gt, lt, ge, le* **type**: *eq, in* **owner.id**: *eq, in* **additionalOwners.id**: *eq, in* **requestable**: *eq* **dimensional**: *eq* **source.id**: *eq, in* **entitlement.id**: *eq, in* **entitlement.name**: *eq, sw, co* **accessProfile.id**: *eq, in* **accessProfile.name**: *eq, sw, co* **privilegeLevel.effective**: *eq, in* Supported composite operators are *and, or*
.PARAMETER AmmKeyValues
No description available.
.OUTPUTS

Rolelistfilterdtov2<PSCustomObject>
#>


function Initialize-Rolelistfilterdtov2 {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Filters} = "",
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${AmmKeyValues}
    )

    Process {
        'Creating PSCustomObject: PSSailpoint.Roles => Rolelistfilterdtov2' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "filters" = ${Filters}
            "ammKeyValues" = ${AmmKeyValues}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to Rolelistfilterdtov2<PSCustomObject>

.DESCRIPTION

Convert from JSON to Rolelistfilterdtov2<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

Rolelistfilterdtov2<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpoint.Roles => Rolelistfilterdtov2' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in Rolelistfilterdtov2
        $AllProperties = ("filters", "ammKeyValues")
        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 "filters"))) { #optional property not found
            $Filters = $null
        } else {
            $Filters = $JsonParameters.PSobject.Properties["filters"].value
        }

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

        $PSO = [PSCustomObject]@{
            "filters" = ${Filters}
            "ammKeyValues" = ${AmmKeyValues}
        }

        return $PSO
    }

}