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

A complex type that controls the countries in which your content is * distributed. CloudFront determines the location of your users using * MaxMind GeoIP databases.

See Also:

AWS * API Reference

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

The method that you want to use to restrict distribution of your content by * country:

  • none: No geo restriction is enabled, * meaning access to content is not restricted by client geo location.

  • *
  • blacklist: The Location elements specify the * countries in which you don't want CloudFront to distribute your content.

    *
  • whitelist: The Location elements * specify the countries in which you want CloudFront to distribute your * content.

*/ inline const GeoRestrictionType& GetRestrictionType() const{ return m_restrictionType; } /** *

The method that you want to use to restrict distribution of your content by * country:

  • none: No geo restriction is enabled, * meaning access to content is not restricted by client geo location.

  • *
  • blacklist: The Location elements specify the * countries in which you don't want CloudFront to distribute your content.

    *
  • whitelist: The Location elements * specify the countries in which you want CloudFront to distribute your * content.

*/ inline bool RestrictionTypeHasBeenSet() const { return m_restrictionTypeHasBeenSet; } /** *

The method that you want to use to restrict distribution of your content by * country:

  • none: No geo restriction is enabled, * meaning access to content is not restricted by client geo location.

  • *
  • blacklist: The Location elements specify the * countries in which you don't want CloudFront to distribute your content.

    *
  • whitelist: The Location elements * specify the countries in which you want CloudFront to distribute your * content.

*/ inline void SetRestrictionType(const GeoRestrictionType& value) { m_restrictionTypeHasBeenSet = true; m_restrictionType = value; } /** *

The method that you want to use to restrict distribution of your content by * country:

  • none: No geo restriction is enabled, * meaning access to content is not restricted by client geo location.

  • *
  • blacklist: The Location elements specify the * countries in which you don't want CloudFront to distribute your content.

    *
  • whitelist: The Location elements * specify the countries in which you want CloudFront to distribute your * content.

*/ inline void SetRestrictionType(GeoRestrictionType&& value) { m_restrictionTypeHasBeenSet = true; m_restrictionType = std::move(value); } /** *

The method that you want to use to restrict distribution of your content by * country:

  • none: No geo restriction is enabled, * meaning access to content is not restricted by client geo location.

  • *
  • blacklist: The Location elements specify the * countries in which you don't want CloudFront to distribute your content.

    *
  • whitelist: The Location elements * specify the countries in which you want CloudFront to distribute your * content.

*/ inline GeoRestriction& WithRestrictionType(const GeoRestrictionType& value) { SetRestrictionType(value); return *this;} /** *

The method that you want to use to restrict distribution of your content by * country:

  • none: No geo restriction is enabled, * meaning access to content is not restricted by client geo location.

  • *
  • blacklist: The Location elements specify the * countries in which you don't want CloudFront to distribute your content.

    *
  • whitelist: The Location elements * specify the countries in which you want CloudFront to distribute your * content.

*/ inline GeoRestriction& WithRestrictionType(GeoRestrictionType&& value) { SetRestrictionType(std::move(value)); return *this;} /** *

When geo restriction is enabled, this is the number of countries * in your whitelist or blacklist. Otherwise, when it is * not enabled, Quantity is 0, and you can omit * Items.

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

When geo restriction is enabled, this is the number of countries * in your whitelist or blacklist. Otherwise, when it is * not enabled, Quantity is 0, and you can omit * Items.

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

When geo restriction is enabled, this is the number of countries * in your whitelist or blacklist. Otherwise, when it is * not enabled, Quantity is 0, and you can omit * Items.

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

When geo restriction is enabled, this is the number of countries * in your whitelist or blacklist. Otherwise, when it is * not enabled, Quantity is 0, and you can omit * Items.

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

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

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

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

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

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

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

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

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

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

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

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

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

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

*/ inline GeoRestriction& AddItems(const Aws::String& value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; } /** *

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

*/ inline GeoRestriction& AddItems(Aws::String&& value) { m_itemsHasBeenSet = true; m_items.push_back(std::move(value)); return *this; } /** *

A complex type that contains a Location element for each country * in which you want CloudFront either to distribute your content * (whitelist) or not distribute your content * (blacklist).

The Location element is a * two-letter, uppercase country code for a country that you want to include in * your blacklist or whitelist. Include one * Location element for each country.

CloudFront and * MaxMind both use ISO 3166 country codes. For the * current list of countries and the corresponding codes, see ISO * 3166-1-alpha-2 code on the International Organization for * Standardization website. You can also refer to the country list on the * CloudFront console, which includes both country names and codes.

*/ inline GeoRestriction& AddItems(const char* value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; } private: GeoRestrictionType m_restrictionType; bool m_restrictionTypeHasBeenSet = false; int m_quantity; bool m_quantityHasBeenSet = false; Aws::Vector m_items; bool m_itemsHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws