/** * 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 list of HTTP methods that CloudFront includes as values for the * Access-Control-Allow-Methods HTTP response header.

For more * information about the Access-Control-Allow-Methods HTTP response * header, see Access-Control-Allow-Methods * in the MDN Web Docs.

See Also:

AWS * API Reference

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

The number of HTTP methods in the list.

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

The number of HTTP methods in the list.

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

The number of HTTP methods in the list.

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

The number of HTTP methods in the list.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

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

The list of HTTP methods. Valid values are:

  • * GET

  • DELETE

  • * HEAD

  • OPTIONS

  • * PATCH

  • POST

  • * PUT

  • ALL

* ALL is a special value that includes all of the listed HTTP * methods.

*/ inline ResponseHeadersPolicyAccessControlAllowMethods& AddItems(ResponseHeadersPolicyAccessControlAllowMethodsValues&& 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