Share via


Filter Class

Definition

This is the base type that represents a filter. To configure a filter, do not directly instantiate an object of this class. Instead, instantiate an object of a derived class such as BoolEqualsFilter, NumberInFilter, StringEqualsFilter etc depending on the type of the key based on which you want to filter.

[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.FilterTypeConverter))]
public class Filter : Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.IFilter
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.FilterTypeConverter))>]
type Filter = class
    interface IFilter
    interface IJsonSerializable
Public Class Filter
Implements IFilter
Inheritance
Filter
Attributes
Implements

Constructors

Filter()

Creates an new Filter instance.

Properties

Key

The field/property in the event based on which you want to filter.

OperatorType

The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.

Methods

DeserializeFromDictionary(IDictionary)

Deserializes a IDictionary into an instance of Filter.

DeserializeFromPSObject(PSObject)

Deserializes a PSObject into an instance of Filter.

FromJson(JsonNode)

Deserializes a JsonNode into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.IFilter. Note: the Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.IFilter interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload.

FromJsonString(String)

Creates a new instance of Filter, deserializing the content from a json string.

ToJson(JsonObject, SerializationMode)

Serializes this instance of Filter into a JsonNode.

ToJsonString()

Serializes this instance to a json string.

ToString()

Applies to