com.amazonaws.services.cloudfront.model.ParametersInCacheKeyAndForwardedToOrigin Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudfront Show documentation
/*
* Copyright 2016-2021 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;
/**
*
* This object determines the values that CloudFront includes in the cache key. These values can include HTTP headers,
* cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to
* the viewer.
*
*
* The headers, cookies, and query strings that are included in the cache key are automatically included in requests
* that CloudFront sends to the origin. CloudFront sends a request when it can’t find an object in its cache that
* matches the request’s cache key. If you want to send values to the origin but not include them in the cache
* key, use OriginRequestPolicy
.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ParametersInCacheKeyAndForwardedToOrigin implements Serializable, Cloneable {
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*/
private Boolean enableAcceptEncodingGzip;
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*/
private Boolean enableAcceptEncodingBrotli;
/**
*
* An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and
* automatically included in requests that CloudFront sends to the origin.
*
*/
private CachePolicyHeadersConfig headersConfig;
/**
*
* An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the
* cache key and automatically included in requests that CloudFront sends to the origin.
*
*/
private CachePolicyCookiesConfig cookiesConfig;
/**
*
* An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are
* included in the cache key and automatically included in requests that CloudFront sends to the origin.
*
*/
private CachePolicyQueryStringsConfig queryStringsConfig;
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @param enableAcceptEncodingGzip
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields
* is true
and the viewer request includes the Accept-Encoding
header, then
* CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field is
* true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the cache
* key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
*/
public void setEnableAcceptEncodingGzip(Boolean enableAcceptEncodingGzip) {
this.enableAcceptEncodingGzip = enableAcceptEncodingGzip;
}
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @return A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these
* fields is true
and the viewer request includes the Accept-Encoding
* header, then CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field
* is true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the
* cache key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
*/
public Boolean getEnableAcceptEncodingGzip() {
return this.enableAcceptEncodingGzip;
}
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @param enableAcceptEncodingGzip
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields
* is true
and the viewer request includes the Accept-Encoding
header, then
* CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field is
* true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the cache
* key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParametersInCacheKeyAndForwardedToOrigin withEnableAcceptEncodingGzip(Boolean enableAcceptEncodingGzip) {
setEnableAcceptEncodingGzip(enableAcceptEncodingGzip);
return this;
}
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @return A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingBrotli
field. If one or both of these
* fields is true
and the viewer request includes the Accept-Encoding
* header, then CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field
* is true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the
* cache key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
*/
public Boolean isEnableAcceptEncodingGzip() {
return this.enableAcceptEncodingGzip;
}
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @param enableAcceptEncodingBrotli
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields
* is true
and the viewer request includes the Accept-Encoding
header, then
* CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field is
* true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the cache
* key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
*/
public void setEnableAcceptEncodingBrotli(Boolean enableAcceptEncodingBrotli) {
this.enableAcceptEncodingBrotli = enableAcceptEncodingBrotli;
}
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @return A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields
* is true
and the viewer request includes the Accept-Encoding
header, then
* CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field
* is true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the
* cache key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
*/
public Boolean getEnableAcceptEncodingBrotli() {
return this.enableAcceptEncodingBrotli;
}
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @param enableAcceptEncodingBrotli
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields
* is true
and the viewer request includes the Accept-Encoding
header, then
* CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field is
* true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the cache
* key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParametersInCacheKeyAndForwardedToOrigin withEnableAcceptEncodingBrotli(Boolean enableAcceptEncodingBrotli) {
setEnableAcceptEncodingBrotli(enableAcceptEncodingBrotli);
return this;
}
/**
*
* A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key and
* included in requests that CloudFront sends to the origin.
*
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields is
* true
and the viewer request includes the Accept-Encoding
header, then CloudFront
* does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy attached,
* do not include the Accept-Encoding
header in the origin request policy. CloudFront always includes
* the Accept-Encoding
header in origin requests when the value of this field is true
, so
* including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
header
* the same as any other HTTP header in the viewer request. By default, it’s not included in the cache key and it’s
* not included in origin requests. In this case, you can manually add Accept-Encoding
to the headers
* whitelist like any other HTTP header.
*
*
* @return A flag that can affect whether the Accept-Encoding
HTTP header is included in the cache key
* and included in requests that CloudFront sends to the origin.
*
* This field is related to the EnableAcceptEncodingGzip
field. If one or both of these fields
* is true
and the viewer request includes the Accept-Encoding
header, then
* CloudFront does the following:
*
*
* -
*
* Normalizes the value of the viewer’s Accept-Encoding
header
*
*
* -
*
* Includes the normalized header in the cache key
*
*
* -
*
* Includes the normalized header in the request to the origin, if a request is necessary
*
*
*
*
* For more information, see Compression support in the Amazon CloudFront Developer Guide.
*
*
* If you set this value to true
, and this cache behavior also has an origin request policy
* attached, do not include the Accept-Encoding
header in the origin request policy. CloudFront
* always includes the Accept-Encoding
header in origin requests when the value of this field
* is true
, so including this header in an origin request policy has no effect.
*
*
* If both of these fields are false
, then CloudFront treats the Accept-Encoding
* header the same as any other HTTP header in the viewer request. By default, it’s not included in the
* cache key and it’s not included in origin requests. In this case, you can manually add
* Accept-Encoding
to the headers whitelist like any other HTTP header.
*/
public Boolean isEnableAcceptEncodingBrotli() {
return this.enableAcceptEncodingBrotli;
}
/**
*
* An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and
* automatically included in requests that CloudFront sends to the origin.
*
*
* @param headersConfig
* An object that determines whether any HTTP headers (and if so, which headers) are included in the cache
* key and automatically included in requests that CloudFront sends to the origin.
*/
public void setHeadersConfig(CachePolicyHeadersConfig headersConfig) {
this.headersConfig = headersConfig;
}
/**
*
* An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and
* automatically included in requests that CloudFront sends to the origin.
*
*
* @return An object that determines whether any HTTP headers (and if so, which headers) are included in the cache
* key and automatically included in requests that CloudFront sends to the origin.
*/
public CachePolicyHeadersConfig getHeadersConfig() {
return this.headersConfig;
}
/**
*
* An object that determines whether any HTTP headers (and if so, which headers) are included in the cache key and
* automatically included in requests that CloudFront sends to the origin.
*
*
* @param headersConfig
* An object that determines whether any HTTP headers (and if so, which headers) are included in the cache
* key and automatically included in requests that CloudFront sends to the origin.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParametersInCacheKeyAndForwardedToOrigin withHeadersConfig(CachePolicyHeadersConfig headersConfig) {
setHeadersConfig(headersConfig);
return this;
}
/**
*
* An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the
* cache key and automatically included in requests that CloudFront sends to the origin.
*
*
* @param cookiesConfig
* An object that determines whether any cookies in viewer requests (and if so, which cookies) are included
* in the cache key and automatically included in requests that CloudFront sends to the origin.
*/
public void setCookiesConfig(CachePolicyCookiesConfig cookiesConfig) {
this.cookiesConfig = cookiesConfig;
}
/**
*
* An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the
* cache key and automatically included in requests that CloudFront sends to the origin.
*
*
* @return An object that determines whether any cookies in viewer requests (and if so, which cookies) are included
* in the cache key and automatically included in requests that CloudFront sends to the origin.
*/
public CachePolicyCookiesConfig getCookiesConfig() {
return this.cookiesConfig;
}
/**
*
* An object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the
* cache key and automatically included in requests that CloudFront sends to the origin.
*
*
* @param cookiesConfig
* An object that determines whether any cookies in viewer requests (and if so, which cookies) are included
* in the cache key and automatically included in requests that CloudFront sends to the origin.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParametersInCacheKeyAndForwardedToOrigin withCookiesConfig(CachePolicyCookiesConfig cookiesConfig) {
setCookiesConfig(cookiesConfig);
return this;
}
/**
*
* An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are
* included in the cache key and automatically included in requests that CloudFront sends to the origin.
*
*
* @param queryStringsConfig
* An object that determines whether any URL query strings in viewer requests (and if so, which query
* strings) are included in the cache key and automatically included in requests that CloudFront sends to the
* origin.
*/
public void setQueryStringsConfig(CachePolicyQueryStringsConfig queryStringsConfig) {
this.queryStringsConfig = queryStringsConfig;
}
/**
*
* An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are
* included in the cache key and automatically included in requests that CloudFront sends to the origin.
*
*
* @return An object that determines whether any URL query strings in viewer requests (and if so, which query
* strings) are included in the cache key and automatically included in requests that CloudFront sends to
* the origin.
*/
public CachePolicyQueryStringsConfig getQueryStringsConfig() {
return this.queryStringsConfig;
}
/**
*
* An object that determines whether any URL query strings in viewer requests (and if so, which query strings) are
* included in the cache key and automatically included in requests that CloudFront sends to the origin.
*
*
* @param queryStringsConfig
* An object that determines whether any URL query strings in viewer requests (and if so, which query
* strings) are included in the cache key and automatically included in requests that CloudFront sends to the
* origin.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParametersInCacheKeyAndForwardedToOrigin withQueryStringsConfig(CachePolicyQueryStringsConfig queryStringsConfig) {
setQueryStringsConfig(queryStringsConfig);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getEnableAcceptEncodingGzip() != null)
sb.append("EnableAcceptEncodingGzip: ").append(getEnableAcceptEncodingGzip()).append(",");
if (getEnableAcceptEncodingBrotli() != null)
sb.append("EnableAcceptEncodingBrotli: ").append(getEnableAcceptEncodingBrotli()).append(",");
if (getHeadersConfig() != null)
sb.append("HeadersConfig: ").append(getHeadersConfig()).append(",");
if (getCookiesConfig() != null)
sb.append("CookiesConfig: ").append(getCookiesConfig()).append(",");
if (getQueryStringsConfig() != null)
sb.append("QueryStringsConfig: ").append(getQueryStringsConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ParametersInCacheKeyAndForwardedToOrigin == false)
return false;
ParametersInCacheKeyAndForwardedToOrigin other = (ParametersInCacheKeyAndForwardedToOrigin) obj;
if (other.getEnableAcceptEncodingGzip() == null ^ this.getEnableAcceptEncodingGzip() == null)
return false;
if (other.getEnableAcceptEncodingGzip() != null && other.getEnableAcceptEncodingGzip().equals(this.getEnableAcceptEncodingGzip()) == false)
return false;
if (other.getEnableAcceptEncodingBrotli() == null ^ this.getEnableAcceptEncodingBrotli() == null)
return false;
if (other.getEnableAcceptEncodingBrotli() != null && other.getEnableAcceptEncodingBrotli().equals(this.getEnableAcceptEncodingBrotli()) == false)
return false;
if (other.getHeadersConfig() == null ^ this.getHeadersConfig() == null)
return false;
if (other.getHeadersConfig() != null && other.getHeadersConfig().equals(this.getHeadersConfig()) == false)
return false;
if (other.getCookiesConfig() == null ^ this.getCookiesConfig() == null)
return false;
if (other.getCookiesConfig() != null && other.getCookiesConfig().equals(this.getCookiesConfig()) == false)
return false;
if (other.getQueryStringsConfig() == null ^ this.getQueryStringsConfig() == null)
return false;
if (other.getQueryStringsConfig() != null && other.getQueryStringsConfig().equals(this.getQueryStringsConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEnableAcceptEncodingGzip() == null) ? 0 : getEnableAcceptEncodingGzip().hashCode());
hashCode = prime * hashCode + ((getEnableAcceptEncodingBrotli() == null) ? 0 : getEnableAcceptEncodingBrotli().hashCode());
hashCode = prime * hashCode + ((getHeadersConfig() == null) ? 0 : getHeadersConfig().hashCode());
hashCode = prime * hashCode + ((getCookiesConfig() == null) ? 0 : getCookiesConfig().hashCode());
hashCode = prime * hashCode + ((getQueryStringsConfig() == null) ? 0 : getQueryStringsConfig().hashCode());
return hashCode;
}
@Override
public ParametersInCacheKeyAndForwardedToOrigin clone() {
try {
return (ParametersInCacheKeyAndForwardedToOrigin) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}