/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudFront { namespace Model { /** *

A complex type that specifies a list of Lambda@Edge functions associations * for a cache behavior.

If you want to invoke one or more Lambda@Edge * functions triggered by requests that match the PathPattern of the * cache behavior, specify the applicable values for Quantity and * Items. Note that there can be up to 4 * LambdaFunctionAssociation items in this list (one for each possible * value of EventType) and each EventType can be * associated with only one function.

If you don't want to invoke any * Lambda@Edge functions for the requests that match PathPattern, * specify 0 for Quantity and omit * Items.

See Also:

AWS * API Reference

*/ class LambdaFunctionAssociations { public: AWS_CLOUDFRONT_API LambdaFunctionAssociations(); AWS_CLOUDFRONT_API LambdaFunctionAssociations(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API LambdaFunctionAssociations& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

The number of Lambda@Edge function associations for this cache behavior.

*/ inline int GetQuantity() const{ return m_quantity; } /** *

The number of Lambda@Edge function associations for this cache behavior.

*/ inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; } /** *

The number of Lambda@Edge function associations for this cache behavior.

*/ inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; } /** *

The number of Lambda@Edge function associations for this cache behavior.

*/ inline LambdaFunctionAssociations& WithQuantity(int value) { SetQuantity(value); return *this;} /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline const Aws::Vector& GetItems() const{ return m_items; } /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline bool ItemsHasBeenSet() const { return m_itemsHasBeenSet; } /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline void SetItems(const Aws::Vector& value) { m_itemsHasBeenSet = true; m_items = value; } /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline void SetItems(Aws::Vector&& value) { m_itemsHasBeenSet = true; m_items = std::move(value); } /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline LambdaFunctionAssociations& WithItems(const Aws::Vector& value) { SetItems(value); return *this;} /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline LambdaFunctionAssociations& WithItems(Aws::Vector&& value) { SetItems(std::move(value)); return *this;} /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline LambdaFunctionAssociations& AddItems(const LambdaFunctionAssociation& value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; } /** *

Optional: A complex type that contains * LambdaFunctionAssociation items for this cache behavior. If * Quantity is 0, you can omit Items.

*/ inline LambdaFunctionAssociations& AddItems(LambdaFunctionAssociation&& value) { m_itemsHasBeenSet = true; m_items.push_back(std::move(value)); return *this; } private: int m_quantity; bool m_quantityHasBeenSet = false; Aws::Vector m_items; bool m_itemsHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws