Interface IAwsSqsFilterAttributeBuilder
Fluent builder interface for configuring filter conditions on a specific attribute.
public interface IAwsSqsFilterAttributeBuilder
- Extension Methods
Examples
filter.Attribute("priority")
.Equals("high")
.Or()
.Equals("urgent");
Remarks
This interface provides operator methods that return to the parent filter builder for continued configuration. Multiple conditions on the same attribute are OR'd together.
Methods
And()
Returns to the parent filter policy builder to configure additional attributes.
IAwsSqsFilterPolicyBuilder And()
Returns
- IAwsSqsFilterPolicyBuilder
The parent filter policy builder.
Examples
filter.Attribute("priority").Equals("high")
.And()
.Attribute("region").Prefix("us-");
// Matches priority="high" AND region starts with "us-"
Remarks
Conditions across different attributes are AND'd together.
AnythingBut(params string[])
Adds an anything-but condition that matches all values except the specified ones.
IAwsSqsFilterAttributeBuilder AnythingBut(params string[] values)
Parameters
valuesstring[]The values to exclude.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("status").AnythingBut("deleted", "archived");
// Matches any status except "deleted" or "archived"
Exceptions
- ArgumentNullException
Thrown when
valuesis null.- ArgumentException
Thrown when
valuesis empty.
Between(double, double)
Adds a numeric between condition (inclusive).
IAwsSqsFilterAttributeBuilder Between(double lower, double upper)
Parameters
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("score").Between(80, 100);
// Matches values from 80 to 100 inclusive
Exceptions
- ArgumentException
Thrown when
loweris greater thanupper.
Equals(int)
Adds an exact match condition for a numeric value.
IAwsSqsFilterAttributeBuilder Equals(int value)
Parameters
valueintThe exact numeric value to match.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("priority").Equals(1);
Equals(string)
Adds an exact match condition for a string value.
IAwsSqsFilterAttributeBuilder Equals(string value)
Parameters
valuestringThe exact value to match.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions or the parent builder.
Examples
filter.Attribute("status").Equals("active");
Exists(bool)
Adds a condition that checks if the attribute exists.
IAwsSqsFilterAttributeBuilder Exists(bool exists)
Parameters
existsbooltrue to match when attribute exists; false to match when attribute is absent. Default is true.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("metadata").Exists(true);
filter.Attribute("deletedAt").Exists(false); // Matches when not deleted
GreaterThan(double)
Adds a numeric greater-than condition.
IAwsSqsFilterAttributeBuilder GreaterThan(double value)
Parameters
valuedoubleThe value that the attribute must be greater than.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("amount").GreaterThan(100);
GreaterThanOrEqual(double)
Adds a numeric greater-than-or-equal condition.
IAwsSqsFilterAttributeBuilder GreaterThanOrEqual(double value)
Parameters
valuedoubleThe value that the attribute must be greater than or equal to.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("amount").GreaterThanOrEqual(100);
LessThan(double)
Adds a numeric less-than condition.
IAwsSqsFilterAttributeBuilder LessThan(double value)
Parameters
valuedoubleThe value that the attribute must be less than.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("priority").LessThan(5);
LessThanOrEqual(double)
Adds a numeric less-than-or-equal condition.
IAwsSqsFilterAttributeBuilder LessThanOrEqual(double value)
Parameters
valuedoubleThe value that the attribute must be less than or equal to.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("priority").LessThanOrEqual(3);
Or()
Indicates that the next condition is an alternative (OR) to the previous.
IAwsSqsFilterAttributeBuilder Or()
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding the alternative condition.
Examples
filter.Attribute("priority").Equals("high").Or().Equals("urgent");
// Matches "high" OR "urgent"
Remarks
Multiple conditions on the same attribute are automatically OR'd together. This method is provided for readability.
Prefix(string)
Adds a prefix match condition.
IAwsSqsFilterAttributeBuilder Prefix(string prefix)
Parameters
prefixstringThe prefix to match.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("region").Prefix("us-");
// Matches "us-east-1", "us-west-2", etc.
Exceptions
- ArgumentException
Thrown when
prefixis null, empty, or whitespace.
Suffix(string)
Adds a suffix match condition.
IAwsSqsFilterAttributeBuilder Suffix(string suffix)
Parameters
suffixstringThe suffix to match.
Returns
- IAwsSqsFilterAttributeBuilder
The attribute builder for adding more conditions.
Examples
filter.Attribute("email").Suffix("@example.com");
Exceptions
- ArgumentException
Thrown when
suffixis null, empty, or whitespace.