/* * Copyright 2010-2014 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 dynamodb-2012-08-10.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.DynamoDBv2.Model { /// /// 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. /// /// public partial class AttributeValue { private MemoryStream _b; private bool? _bool; private List _bs = new List(); private List _l = new List(); private Dictionary _m = new Dictionary(); private string _n; private List _ns = new List(); private bool? _null; private string _s; private List _ss = new List(); /// /// Empty constructor used to set properties independently even when a simple constructor is available /// public AttributeValue() { } /// /// Instantiates AttributeValue with the parameterized properties /// /// An attribute of type String. For example: "S": "Hello" public AttributeValue(string s) { _s = s; } /// /// Instantiates AttributeValue with the parameterized properties /// /// An attribute of type String Set. For example: "SS": ["Giraffe", "Hippo" ,"Zebra"] public AttributeValue(List ss) { _ss = ss; } /// /// Gets and sets the property B. /// /// An attribute of type Binary. For example: /// /// /// /// "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk" /// /// public MemoryStream B { get { return this._b; } set { this._b = value; } } // Check to see if B property is set internal bool IsSetB() { return this._b != null; } /// /// Gets and sets the property BOOL. /// /// An attribute of type Boolean. For example: /// /// /// /// "BOOL": true /// /// public bool BOOL { get { return this._bool.GetValueOrDefault(); } set { this._bool = value; } } /// /// This property is set to true if the property /// is set; false otherwise. /// This property can be used to determine if the related property /// was returned by a service response or if the related property /// should be sent to the service during a service call. /// /// /// True if the related property was set or will be sent to a service; false otherwise. /// public bool IsBOOLSet { get { return Amazon.Util.Internal.InternalSDKUtils.GetIsSet(this._bool); } set { Amazon.Util.Internal.InternalSDKUtils.SetIsSet(value, ref this._bool); } } // Check to see if BOOL property is set internal bool IsSetBOOL() { return this.IsBOOLSet; } /// /// Gets and sets the property BS. /// /// An attribute of type Binary Set. For example: /// /// /// /// "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="] /// /// public List BS { get { return this._bs; } set { this._bs = value; } } // Check to see if BS property is set internal bool IsSetBS() { return this._bs != null && this._bs.Count > 0; } /// /// Gets and sets the property L. /// /// An attribute of type List. For example: /// /// /// /// "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}] /// /// public List L { get { return this._l; } set { this._l = value; } } /// /// This property is set to true if the property /// is set; false otherwise. /// This property can be used to determine if the related property /// was returned by a service response or if the related property /// should be sent to the service during a service call. /// /// /// True if the related property was set or will be sent to a service; false otherwise. /// public bool IsLSet { get { return Amazon.Util.Internal.InternalSDKUtils.GetIsSet(this._l); } set { Amazon.Util.Internal.InternalSDKUtils.SetIsSet(value, ref this._l); } } // Check to see if L property is set internal bool IsSetL() { return this.IsLSet; } /// /// Gets and sets the property M. /// /// An attribute of type Map. For example: /// /// /// /// "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}} /// /// public Dictionary M { get { return this._m; } set { this._m = value; } } /// /// This property is set to true if the property /// is set; false otherwise. /// This property can be used to determine if the related property /// was returned by a service response or if the related property /// should be sent to the service during a service call. /// /// /// True if the related property was set or will be sent to a service; false otherwise. /// public bool IsMSet { get { return Amazon.Util.Internal.InternalSDKUtils.GetIsSet(this._m); } set { Amazon.Util.Internal.InternalSDKUtils.SetIsSet(value, ref this._m); } } // Check to see if M property is set internal bool IsSetM() { return this.IsMSet; } /// /// Gets and sets the property N. /// /// An attribute of type Number. For example: /// /// /// /// "N": "123.45" /// /// /// /// Numbers are sent across the network to DynamoDB as strings, to maximize compatibility /// across languages and libraries. However, DynamoDB treats them as number type attributes /// for mathematical operations. /// /// public string N { get { return this._n; } set { this._n = value; } } // Check to see if N property is set internal bool IsSetN() { return this._n != null; } /// /// Gets and sets the property NS. /// /// An attribute of type Number Set. For example: /// /// /// /// "NS": ["42.2", "-19", "7.5", "3.14"] /// /// /// /// Numbers are sent across the network to DynamoDB as strings, to maximize compatibility /// across languages and libraries. However, DynamoDB treats them as number type attributes /// for mathematical operations. /// /// public List NS { get { return this._ns; } set { this._ns = value; } } // Check to see if NS property is set internal bool IsSetNS() { return this._ns != null && this._ns.Count > 0; } /// /// Gets and sets the property NULL. /// /// An attribute of type Null. For example: /// /// /// /// "NULL": true /// /// public bool NULL { get { return this._null.GetValueOrDefault(); } set { this._null = value; } } // Check to see if NULL property is set internal bool IsSetNULL() { return this._null.HasValue; } /// /// Gets and sets the property S. /// /// An attribute of type String. For example: /// /// /// /// "S": "Hello" /// /// public string S { get { return this._s; } set { this._s = value; } } // Check to see if S property is set internal bool IsSetS() { return this._s != null; } /// /// Gets and sets the property SS. /// /// An attribute of type String Set. For example: /// /// /// /// "SS": ["Giraffe", "Hippo" ,"Zebra"] /// /// public List SS { get { return this._ss; } set { this._ss = value; } } // Check to see if SS property is set internal bool IsSetSS() { return this._ss != null && this._ss.Count > 0; } } }