cc/src/PSSailpointCC/Model/RefreshIdentitiesRequest.ps1

#
# IdentityNow cc (private) APIs
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER VarFilter
Defines the identity or identities which this refresh applies to. The filter must use searchable identity attributes. If the filter cannot be understood or parsed, all identities will be refreshed.
.PARAMETER RefreshArgs
No description available.
.OUTPUTS

RefreshIdentitiesRequest<PSCustomObject>
#>


function Initialize-CCRefreshIdentitiesRequest {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${VarFilter},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${RefreshArgs}
    )

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


        $PSO = [PSCustomObject]@{
            "filter" = ${VarFilter}
            "refreshArgs" = ${RefreshArgs}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to RefreshIdentitiesRequest<PSCustomObject>

.DESCRIPTION

Convert from JSON to RefreshIdentitiesRequest<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

RefreshIdentitiesRequest<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

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

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

        $PSO = [PSCustomObject]@{
            "filter" = ${VarFilter}
            "refreshArgs" = ${RefreshArgs}
        }

        return $PSO
    }

}