/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace DynamoDB { namespace Model { /** *

Represents an attribute for describing the key schema for the table and * indexes.

See Also:

AWS * API Reference

*/ class AttributeDefinition { public: AWS_DYNAMODB_API AttributeDefinition(); AWS_DYNAMODB_API AttributeDefinition(Aws::Utils::Json::JsonView jsonValue); AWS_DYNAMODB_API AttributeDefinition& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A name for the attribute.

*/ inline const Aws::String& GetAttributeName() const{ return m_attributeName; } /** *

A name for the attribute.

*/ inline bool AttributeNameHasBeenSet() const { return m_attributeNameHasBeenSet; } /** *

A name for the attribute.

*/ inline void SetAttributeName(const Aws::String& value) { m_attributeNameHasBeenSet = true; m_attributeName = value; } /** *

A name for the attribute.

*/ inline void SetAttributeName(Aws::String&& value) { m_attributeNameHasBeenSet = true; m_attributeName = std::move(value); } /** *

A name for the attribute.

*/ inline void SetAttributeName(const char* value) { m_attributeNameHasBeenSet = true; m_attributeName.assign(value); } /** *

A name for the attribute.

*/ inline AttributeDefinition& WithAttributeName(const Aws::String& value) { SetAttributeName(value); return *this;} /** *

A name for the attribute.

*/ inline AttributeDefinition& WithAttributeName(Aws::String&& value) { SetAttributeName(std::move(value)); return *this;} /** *

A name for the attribute.

*/ inline AttributeDefinition& WithAttributeName(const char* value) { SetAttributeName(value); return *this;} /** *

The data type for the attribute, where:

  • S - * the attribute is of type String

  • N - the * attribute is of type Number

  • B - the attribute is * of type Binary

*/ inline const ScalarAttributeType& GetAttributeType() const{ return m_attributeType; } /** *

The data type for the attribute, where:

  • S - * the attribute is of type String

  • N - the * attribute is of type Number

  • B - the attribute is * of type Binary

*/ inline bool AttributeTypeHasBeenSet() const { return m_attributeTypeHasBeenSet; } /** *

The data type for the attribute, where:

  • S - * the attribute is of type String

  • N - the * attribute is of type Number

  • B - the attribute is * of type Binary

*/ inline void SetAttributeType(const ScalarAttributeType& value) { m_attributeTypeHasBeenSet = true; m_attributeType = value; } /** *

The data type for the attribute, where:

  • S - * the attribute is of type String

  • N - the * attribute is of type Number

  • B - the attribute is * of type Binary

*/ inline void SetAttributeType(ScalarAttributeType&& value) { m_attributeTypeHasBeenSet = true; m_attributeType = std::move(value); } /** *

The data type for the attribute, where:

  • S - * the attribute is of type String

  • N - the * attribute is of type Number

  • B - the attribute is * of type Binary

*/ inline AttributeDefinition& WithAttributeType(const ScalarAttributeType& value) { SetAttributeType(value); return *this;} /** *

The data type for the attribute, where:

  • S - * the attribute is of type String

  • N - the * attribute is of type Number

  • B - the attribute is * of type Binary

*/ inline AttributeDefinition& WithAttributeType(ScalarAttributeType&& value) { SetAttributeType(std::move(value)); return *this;} private: Aws::String m_attributeName; bool m_attributeNameHasBeenSet = false; ScalarAttributeType m_attributeType; bool m_attributeTypeHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws