Class ExpectedState
- Namespace
- Amazon.DynamoDBv2.DocumentModel
- Assembly
- AWSSDK.DynamoDBv2.dll
Expected state of an item in DynamoDB.
public class ExpectedState
- Inheritance
-
ExpectedState
- Inherited Members
Constructors
ExpectedState()
Constructs an empty ExpectedState with ConditionalOeprator set to AND.
public ExpectedState()
Properties
ConditionalOperator
Operator dictating whether ALL or SOME of the expected values must be true to satisfy the overall expected state.
public ConditionalOperatorValues ConditionalOperator { get; set; }
Property Value
ExpectedValues
Attribute name to ExpectedValue mapping. Represents the expected state of a number of attributes of a DynamoDB item.
public Dictionary<string, ExpectedValue> ExpectedValues { get; set; }
Property Value
Methods
AddExpected(string, ScanOperator, params Primitive[])
Adds an ExpectedValue with the specific Comparison and Values for the attribute.
public void AddExpected(string attributeName, ScanOperator comparison, params Primitive[] values)
Parameters
attributeName
stringAttribute that is being tested
comparison
ScanOperatorComparison operator for the expected value.
values
Primitive[]Values to compare the attribute against.
AddExpected(string, bool)
Adds an ExpectedValue with the specific Exists value for the attribute.
public void AddExpected(string attributeName, bool exists)
Parameters
attributeName
stringAttribute that is being tested
exists
boolFlag whether the attribute should exist or not.
ToExpectedAttributeMap()
Creates a map of attribute names mapped to ExpectedAttributeValue objects. This call will use the conversion specified by AWSConfigs.DynamoDBConfig.ConversionSchema
public Dictionary<string, ExpectedAttributeValue> ToExpectedAttributeMap()
Returns
ToExpectedAttributeMap(Table)
Creates a map of attribute names mapped to ExpectedAttributeValue objects. This call will use the conversion specified in the table.
public Dictionary<string, ExpectedAttributeValue> ToExpectedAttributeMap(Table table)
Parameters
table
Table
Returns
ToExpectedAttributeMap(DynamoDBEntryConversion)
Creates a map of attribute names mapped to ExpectedAttributeValue objects.
public Dictionary<string, ExpectedAttributeValue> ToExpectedAttributeMap(DynamoDBEntryConversion conversion)
Parameters
conversion
DynamoDBEntryConversionConversion to use for converting .NET values to DynamoDB values.