public PutItemRequest withExpected(java.util.Map<String, ExpectedAttributeValue> expected) {
        setExpected(expected);
        return this;
    }
<p>
This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href=
"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html"
>Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.
</p>

@param expected
       This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a
       href=
       "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html"
       >Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/PutItemRequest.java