/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.dynamodbv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* For the UpdateItem operation, represents the attributes to be modified, the action to perform on each, * and the new value for each. *

* *

* You cannot use UpdateItem to update any primary key attributes. Instead, you will need to delete the * item, and then use PutItem to create a new item with new attributes. *

*
*

* Attribute values cannot be null; string and binary type attributes must have lengths greater than zero; and set type * attributes must not be empty. Requests with empty values will be rejected with a ValidationException * exception. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AttributeValueUpdate implements Serializable, Cloneable, StructuredPojo { /** *

* Represents the data for an attribute. *

*

* Each attribute value is described as a name-value pair. The name is the data type, and the value is the data * itself. *

*

* For more information, see Data Types in the Amazon DynamoDB Developer Guide. *

*/ private AttributeValue value; /** *

* Specifies how to perform the update. Valid values are PUT (default), DELETE, and * ADD. The behavior depends on whether the specified primary key already exists in the table. *

*

* If an item with the specified Key is found in the table: *

* *

* If no item with the specified Key is found: *

* */ private String action; /** * Default constructor for AttributeValueUpdate object. Callers should use the setter or fluent setter (with...) * methods to initialize the object after creating it. */ public AttributeValueUpdate() { } /** * Constructs a new AttributeValueUpdate object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param value * Represents the data for an attribute.

*

* Each attribute value is described as a name-value pair. The name is the data type, and the value is the * data itself. *

*

* For more information, see Data Types in the Amazon DynamoDB Developer Guide. * @param action * Specifies how to perform the update. Valid values are PUT (default), DELETE, and * ADD. The behavior depends on whether the specified primary key already exists in the table. *

*

* If an item with the specified Key is found in the table: *

* *

* If no item with the specified Key is found: *

*