/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the sdb-2009-04-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.SimpleDB.Model { /// /// Container for the parameters to the PutAttributes operation. /// The PutAttributes operation creates or replaces attributes in an item. The client /// may specify new attributes using a combination of the Attribute.X.Name /// and Attribute.X.Value parameters. The client specifies the first attribute /// by the parameters Attribute.0.Name and Attribute.0.Value, /// the second attribute by the parameters Attribute.1.Name and Attribute.1.Value, /// and so on. /// /// /// /// Attributes are uniquely identified in an item by their name/value combination. For /// example, a single item can have the attributes { "first_name", "first_value" /// } and { "first_name", second_value" }. However, it cannot have /// two attribute instances where both the Attribute.X.Name and Attribute.X.Value /// are the same. /// /// /// /// Optionally, the requestor can supply the Replace parameter for each /// individual attribute. Setting this value to true causes the new attribute /// value to replace the existing attribute value(s). For example, if an item has the /// attributes { 'a', '1' }, { 'b', '2'} and { 'b', '3' /// } and the requestor calls PutAttributes using the attributes { /// 'b', '4' } with the Replace parameter set to true, the final attributes /// of the item are changed to { 'a', '1' } and { 'b', '4' }, /// which replaces the previous values of the 'b' attribute with the new value. /// /// /// /// You cannot specify an empty string as an attribute name. /// /// /// /// Because Amazon SimpleDB makes multiple copies of client data and uses an eventual /// consistency update model, an immediate GetAttributes or Select operation /// (read) immediately after a PutAttributes or DeleteAttributes operation /// (write) might not return the updated data. /// /// /// /// The following limitations are enforced for this operation: /// /// public partial class PutAttributesRequest : AmazonSimpleDBRequest { private List _attributes = new List(); private string _domainName; private UpdateCondition _expected; private string _itemName; /// /// Empty constructor used to set properties independently even when a simple constructor is available /// public PutAttributesRequest() { } /// /// Instantiates PutAttributesRequest with the parameterized properties /// /// The name of the domain in which to perform the operation. /// The name of the item. /// The list of attributes. public PutAttributesRequest(string domainName, string itemName, List attributes) { _domainName = domainName; _itemName = itemName; _attributes = attributes; } /// /// Instantiates PutAttributesRequest with the parameterized properties /// /// The name of the domain in which to perform the operation. /// The name of the item. /// The list of attributes. /// The update condition which, if specified, determines whether the specified attributes will be updated or not. The update condition must be satisfied in order for this request to be processed and the attributes to be updated. public PutAttributesRequest(string domainName, string itemName, List attributes, UpdateCondition expected) { _domainName = domainName; _itemName = itemName; _attributes = attributes; _expected = expected; } /// /// Gets and sets the property Attributes. The list of attributes. /// [AWSProperty(Required=true)] public List Attributes { get { return this._attributes; } set { this._attributes = value; } } // Check to see if Attributes property is set internal bool IsSetAttributes() { return this._attributes != null && this._attributes.Count > 0; } /// /// Gets and sets the property DomainName. The name of the domain in which to perform /// the operation. /// [AWSProperty(Required=true)] public string DomainName { get { return this._domainName; } set { this._domainName = value; } } // Check to see if DomainName property is set internal bool IsSetDomainName() { return this._domainName != null; } /// /// Gets and sets the property Expected. The update condition which, if specified, determines /// whether the specified attributes will be updated or not. The update condition must /// be satisfied in order for this request to be processed and the attributes to be updated. /// public UpdateCondition Expected { get { return this._expected; } set { this._expected = value; } } // Check to see if Expected property is set internal bool IsSetExpected() { return this._expected != null; } /// /// Gets and sets the property ItemName. The name of the item. /// [AWSProperty(Required=true)] public string ItemName { get { return this._itemName; } set { this._itemName = value; } } // Check to see if ItemName property is set internal bool IsSetItemName() { return this._itemName != null; } } }