/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.cloudfront.model; import java.io.Serializable; import javax.annotation.Generated; /** *

* 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 AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GeoRestriction implements Serializable, Cloneable { /** *

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

* */ private String restrictionType; /** *

* 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. *

*/ private Integer quantity; /** *

* 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. *

*/ private com.amazonaws.internal.SdkInternalList items; /** * Default constructor for GeoRestriction object. Callers should use the setter or fluent setter (with...) methods * to initialize the object after creating it. */ public GeoRestriction() { } /** * Constructs a new GeoRestriction object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param restrictionType * The method that you want to use to restrict distribution of your content by country:

*