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

Represents attributes that are copied (projected) from the table into an * index. These are in addition to the primary key attributes and index key * attributes, which are automatically projected.

See Also:

AWS * API Reference

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

The set of attributes that are projected into the index:

  • * KEYS_ONLY - Only the index and primary keys are projected into the * index.

  • INCLUDE - In addition to the attributes * described in KEYS_ONLY, the secondary index will include other * non-key attributes that you specify.

  • ALL - All * of the table attributes are projected into the index.

*/ inline const ProjectionType& GetProjectionType() const{ return m_projectionType; } /** *

The set of attributes that are projected into the index:

  • * KEYS_ONLY - Only the index and primary keys are projected into the * index.

  • INCLUDE - In addition to the attributes * described in KEYS_ONLY, the secondary index will include other * non-key attributes that you specify.

  • ALL - All * of the table attributes are projected into the index.

*/ inline bool ProjectionTypeHasBeenSet() const { return m_projectionTypeHasBeenSet; } /** *

The set of attributes that are projected into the index:

  • * KEYS_ONLY - Only the index and primary keys are projected into the * index.

  • INCLUDE - In addition to the attributes * described in KEYS_ONLY, the secondary index will include other * non-key attributes that you specify.

  • ALL - All * of the table attributes are projected into the index.

*/ inline void SetProjectionType(const ProjectionType& value) { m_projectionTypeHasBeenSet = true; m_projectionType = value; } /** *

The set of attributes that are projected into the index:

  • * KEYS_ONLY - Only the index and primary keys are projected into the * index.

  • INCLUDE - In addition to the attributes * described in KEYS_ONLY, the secondary index will include other * non-key attributes that you specify.

  • ALL - All * of the table attributes are projected into the index.

*/ inline void SetProjectionType(ProjectionType&& value) { m_projectionTypeHasBeenSet = true; m_projectionType = std::move(value); } /** *

The set of attributes that are projected into the index:

  • * KEYS_ONLY - Only the index and primary keys are projected into the * index.

  • INCLUDE - In addition to the attributes * described in KEYS_ONLY, the secondary index will include other * non-key attributes that you specify.

  • ALL - All * of the table attributes are projected into the index.

*/ inline Projection& WithProjectionType(const ProjectionType& value) { SetProjectionType(value); return *this;} /** *

The set of attributes that are projected into the index:

  • * KEYS_ONLY - Only the index and primary keys are projected into the * index.

  • INCLUDE - In addition to the attributes * described in KEYS_ONLY, the secondary index will include other * non-key attributes that you specify.

  • ALL - All * of the table attributes are projected into the index.

*/ inline Projection& WithProjectionType(ProjectionType&& value) { SetProjectionType(std::move(value)); return *this;} /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline const Aws::Vector& GetNonKeyAttributes() const{ return m_nonKeyAttributes; } /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline bool NonKeyAttributesHasBeenSet() const { return m_nonKeyAttributesHasBeenSet; } /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline void SetNonKeyAttributes(const Aws::Vector& value) { m_nonKeyAttributesHasBeenSet = true; m_nonKeyAttributes = value; } /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline void SetNonKeyAttributes(Aws::Vector&& value) { m_nonKeyAttributesHasBeenSet = true; m_nonKeyAttributes = std::move(value); } /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline Projection& WithNonKeyAttributes(const Aws::Vector& value) { SetNonKeyAttributes(value); return *this;} /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline Projection& WithNonKeyAttributes(Aws::Vector&& value) { SetNonKeyAttributes(std::move(value)); return *this;} /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline Projection& AddNonKeyAttributes(const Aws::String& value) { m_nonKeyAttributesHasBeenSet = true; m_nonKeyAttributes.push_back(value); return *this; } /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline Projection& AddNonKeyAttributes(Aws::String&& value) { m_nonKeyAttributesHasBeenSet = true; m_nonKeyAttributes.push_back(std::move(value)); return *this; } /** *

Represents the non-key attribute names which will be projected into the * index.

For local secondary indexes, the total count of * NonKeyAttributes summed across all of the local secondary indexes, * must not exceed 100. If you project the same attribute into two different * indexes, this counts as two distinct attributes when determining the total.

*/ inline Projection& AddNonKeyAttributes(const char* value) { m_nonKeyAttributesHasBeenSet = true; m_nonKeyAttributes.push_back(value); return *this; } private: ProjectionType m_projectionType; bool m_projectionTypeHasBeenSet = false; Aws::Vector m_nonKeyAttributes; bool m_nonKeyAttributesHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws