Model/PublicIdentitiesTextQuery.ps1
|
# # Identity Security Cloud API - Public Identities # 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 Text query clause used inside a TEXT composite entry. .PARAMETER Fields Attribute keys to search. Base keys must match GET /public-identities/v2/visible-attributes (defaultAttributes + configuredAttributes). Optional ""attributes."" prefix and/or "".exact"" suffix (e.g. email, attributes.email, email.exact, attributes.email.exact). .PARAMETER Terms Search terms. Each value must be a non-blank string or a JSON boolean. .PARAMETER MatchAny When true, terms/fields are OR'd within this text query. Optional for normal search clauses. The mandatory ACTIVE identityState gate entry must set this to false. .PARAMETER Contains When true, matches substrings. Optional for normal search clauses. The mandatory ACTIVE identityState gate entry must set this to false. .PARAMETER Strict When true, applies strict matching. Optional for normal search clauses. The mandatory ACTIVE identityState gate entry must set this to true. .OUTPUTS PublicIdentitiesTextQuery<PSCustomObject> #> function Initialize-PublicIdentitiesTextQuery { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Fields}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Terms}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${MatchAny} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Contains} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Strict} = $false ) Process { 'Creating PSCustomObject: PSSailpoint.PublicIdentities => PublicIdentitiesTextQuery' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Fields) { throw "invalid value for 'Fields', 'Fields' cannot be null." } if ($Fields.length -lt 1) { throw "invalid value for 'Fields', number of items must be greater than or equal to 1." } if (!$Terms) { throw "invalid value for 'Terms', 'Terms' cannot be null." } if ($Terms.length -lt 1) { throw "invalid value for 'Terms', number of items must be greater than or equal to 1." } $PSO = [PSCustomObject]@{ "fields" = ${Fields} "terms" = ${Terms} "matchAny" = ${MatchAny} "contains" = ${Contains} "strict" = ${Strict} } return $PSO } } <# .SYNOPSIS Convert from JSON to PublicIdentitiesTextQuery<PSCustomObject> .DESCRIPTION Convert from JSON to PublicIdentitiesTextQuery<PSCustomObject> .PARAMETER Json Json object .OUTPUTS PublicIdentitiesTextQuery<PSCustomObject> #> function ConvertFrom-JsonToPublicIdentitiesTextQuery { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.PublicIdentities => PublicIdentitiesTextQuery' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PublicIdentitiesTextQuery $AllProperties = ("fields", "terms", "matchAny", "contains", "strict") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'fields' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "fields"))) { throw "Error! JSON cannot be serialized due to the required property 'fields' missing." } else { $Fields = $JsonParameters.PSobject.Properties["fields"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "terms"))) { throw "Error! JSON cannot be serialized due to the required property 'terms' missing." } else { $Terms = $JsonParameters.PSobject.Properties["terms"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "matchAny"))) { #optional property not found $MatchAny = $null } else { $MatchAny = $JsonParameters.PSobject.Properties["matchAny"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "contains"))) { #optional property not found $Contains = $null } else { $Contains = $JsonParameters.PSobject.Properties["contains"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "strict"))) { #optional property not found $Strict = $null } else { $Strict = $JsonParameters.PSobject.Properties["strict"].value } $PSO = [PSCustomObject]@{ "fields" = ${Fields} "terms" = ${Terms} "matchAny" = ${MatchAny} "contains" = ${Contains} "strict" = ${Strict} } return $PSO } } |