Model/SearchRequest.ps1

#
# Identity Security Cloud API - Next Generation Certification Campaigns
# Use these APIs to interact with the Identity Security Cloud 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

Search Request

.PARAMETER QueryString
Query String
.OUTPUTS

SearchRequest<PSCustomObject>
#>


function Initialize-SearchRequest {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${QueryString}
    )

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


        $PSO = [PSCustomObject]@{
            "queryString" = ${QueryString}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to SearchRequest<PSCustomObject>

.DESCRIPTION

Convert from JSON to SearchRequest<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

SearchRequest<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

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

        $PSO = [PSCustomObject]@{
            "queryString" = ${QueryString}
        }

        return $PSO
    }

}