Table of Contents

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

ConditionalOperatorValues

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

Dictionary<string, ExpectedValue>

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 string

Attribute that is being tested

comparison ScanOperator

Comparison 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 string

Attribute that is being tested

exists bool

Flag 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

Dictionary<string, ExpectedAttributeValue>

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

Dictionary<string, ExpectedAttributeValue>

ToExpectedAttributeMap(DynamoDBEntryConversion)

Creates a map of attribute names mapped to ExpectedAttributeValue objects.

public Dictionary<string, ExpectedAttributeValue> ToExpectedAttributeMap(DynamoDBEntryConversion conversion)

Parameters

conversion DynamoDBEntryConversion

Conversion to use for converting .NET values to DynamoDB values.

Returns

Dictionary<string, ExpectedAttributeValue>