Model/EventAttributesFilterDefinitionConditionsInner.ps1
|
# # SailPoint Identity Security API - Workflows # 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 A single field comparison. .PARAMETER Path Dot-separated path to the field to compare, relative to each item in the filter's `path`. .PARAMETER Operator Comparison operator. `string` fields support `==`, `!=`, `=~`, `size`, `contains`, `is empty`, `is not empty`, `is null` and `is not null`. `number` fields support `==`, `!=`, `<`, `<=`, `>`, `>=`, `is null` and `is not null`. `boolean` fields support `==`, `!=`, `is null` and `is not null`. .PARAMETER Type Data type of the field at `path`, which determines how `value` is compared. .PARAMETER Value No description available. .OUTPUTS EventAttributesFilterDefinitionConditionsInner<PSCustomObject> #> function Initialize-EventAttributesFilterDefinitionConditionsInner { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Path}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Operator}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("string", "number", "boolean")] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Value} ) Process { 'Creating PSCustomObject: PSSailpoint.Workflows => EventAttributesFilterDefinitionConditionsInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Path) { throw "invalid value for 'Path', 'Path' cannot be null." } if (!$Operator) { throw "invalid value for 'Operator', 'Operator' cannot be null." } $PSO = [PSCustomObject]@{ "path" = ${Path} "operator" = ${Operator} "type" = ${Type} "value" = ${Value} } return $PSO } } <# .SYNOPSIS Convert from JSON to EventAttributesFilterDefinitionConditionsInner<PSCustomObject> .DESCRIPTION Convert from JSON to EventAttributesFilterDefinitionConditionsInner<PSCustomObject> .PARAMETER Json Json object .OUTPUTS EventAttributesFilterDefinitionConditionsInner<PSCustomObject> #> function ConvertFrom-JsonToEventAttributesFilterDefinitionConditionsInner { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Workflows => EventAttributesFilterDefinitionConditionsInner' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in EventAttributesFilterDefinitionConditionsInner $AllProperties = ("path", "operator", "type", "value") 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 'path' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "path"))) { throw "Error! JSON cannot be serialized due to the required property 'path' missing." } else { $Path = $JsonParameters.PSobject.Properties["path"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "operator"))) { throw "Error! JSON cannot be serialized due to the required property 'operator' missing." } else { $Operator = $JsonParameters.PSobject.Properties["operator"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found $Type = $null } else { $Type = $JsonParameters.PSobject.Properties["type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "value"))) { #optional property not found $Value = $null } else { $Value = $JsonParameters.PSobject.Properties["value"].value } $PSO = [PSCustomObject]@{ "path" = ${Path} "operator" = ${Operator} "type" = ${Type} "value" = ${Value} } return $PSO } } |