AWS SDK for C++  0.12.9
AWS SDK for C++
AttributeDefinition.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace DynamoDB
30 {
31 namespace Model
32 {
33 
39  {
40  public:
43  AttributeDefinition& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Aws::String& GetAttributeName() const{ return m_attributeName; }
50 
54  inline void SetAttributeName(const Aws::String& value) { m_attributeNameHasBeenSet = true; m_attributeName = value; }
55 
59  inline void SetAttributeName(Aws::String&& value) { m_attributeNameHasBeenSet = true; m_attributeName = value; }
60 
64  inline void SetAttributeName(const char* value) { m_attributeNameHasBeenSet = true; m_attributeName.assign(value); }
65 
69  inline AttributeDefinition& WithAttributeName(const Aws::String& value) { SetAttributeName(value); return *this;}
70 
74  inline AttributeDefinition& WithAttributeName(Aws::String&& value) { SetAttributeName(value); return *this;}
75 
79  inline AttributeDefinition& WithAttributeName(const char* value) { SetAttributeName(value); return *this;}
80 
87  inline const ScalarAttributeType& GetAttributeType() const{ return m_attributeType; }
88 
95  inline void SetAttributeType(const ScalarAttributeType& value) { m_attributeTypeHasBeenSet = true; m_attributeType = value; }
96 
103  inline void SetAttributeType(ScalarAttributeType&& value) { m_attributeTypeHasBeenSet = true; m_attributeType = value; }
104 
111  inline AttributeDefinition& WithAttributeType(const ScalarAttributeType& value) { SetAttributeType(value); return *this;}
112 
119  inline AttributeDefinition& WithAttributeType(ScalarAttributeType&& value) { SetAttributeType(value); return *this;}
120 
121  private:
122  Aws::String m_attributeName;
123  bool m_attributeNameHasBeenSet;
124  ScalarAttributeType m_attributeType;
125  bool m_attributeTypeHasBeenSet;
126  };
127 
128 } // namespace Model
129 } // namespace DynamoDB
130 } // namespace Aws
AttributeDefinition & WithAttributeType(ScalarAttributeType &&value)
AttributeDefinition & WithAttributeName(const char *value)
const Aws::String & GetAttributeName() const
const ScalarAttributeType & GetAttributeType() const
#define AWS_DYNAMODB_API
AttributeDefinition & WithAttributeType(const ScalarAttributeType &value)
AttributeDefinition & WithAttributeName(const Aws::String &value)
void SetAttributeType(const ScalarAttributeType &value)
void SetAttributeName(const Aws::String &value)
void SetAttributeType(ScalarAttributeType &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
AttributeDefinition & WithAttributeName(Aws::String &&value)
JSON (JavaScript Object Notation).