All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.cloudfront.model.OriginRequestPolicyHeadersConfig Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudFront module holds the client classes that are used for communicating with Amazon CloudFront Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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;

/**
 * 

* An object that determines whether any HTTP headers (and if so, which headers) are included in requests that * CloudFront sends to the origin. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OriginRequestPolicyHeadersConfig implements Serializable, Cloneable { /** *

* Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values * are: *

*
    *
  • *

    * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even when this * field is set to none, any headers that are listed in a CachePolicy are included * in origin requests. *

    *
  • *
  • *

    * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

    *
  • *
  • *

    * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends to * the origin. *

    *
  • *
  • *

    * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional CloudFront * headers that are listed in the Headers type are included in requests that CloudFront sends to the * origin. The additional headers are added by CloudFront. *

    *
  • *
*/ private String headerBehavior; private Headers headers; /** *

* Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values * are: *

*
    *
  • *

    * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even when this * field is set to none, any headers that are listed in a CachePolicy are included * in origin requests. *

    *
  • *
  • *

    * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

    *
  • *
  • *

    * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends to * the origin. *

    *
  • *
  • *

    * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional CloudFront * headers that are listed in the Headers type are included in requests that CloudFront sends to the * origin. The additional headers are added by CloudFront. *

    *
  • *
* * @param headerBehavior * Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid * values are:

*
    *
  • *

    * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even * when this field is set to none, any headers that are listed in a CachePolicy * are included in origin requests. *

    *
  • *
  • *

    * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

    *
  • *
  • *

    * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront * sends to the origin. *

    *
  • *
  • *

    * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional * CloudFront headers that are listed in the Headers type are included in requests that * CloudFront sends to the origin. The additional headers are added by CloudFront. *

    *
  • * @see OriginRequestPolicyHeaderBehavior */ public void setHeaderBehavior(String headerBehavior) { this.headerBehavior = headerBehavior; } /** *

    * Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values * are: *

    *
      *
    • *

      * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even when this * field is set to none, any headers that are listed in a CachePolicy are included * in origin requests. *

      *
    • *
    • *

      * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

      *
    • *
    • *

      * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends to * the origin. *

      *
    • *
    • *

      * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional CloudFront * headers that are listed in the Headers type are included in requests that CloudFront sends to the * origin. The additional headers are added by CloudFront. *

      *
    • *
    * * @return Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid * values are:

    *
      *
    • *

      * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even * when this field is set to none, any headers that are listed in a CachePolicy * are included in origin requests. *

      *
    • *
    • *

      * whitelist – The HTTP headers that are listed in the Headers type are included * in requests that CloudFront sends to the origin. *

      *
    • *
    • *

      * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront * sends to the origin. *

      *
    • *
    • *

      * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional * CloudFront headers that are listed in the Headers type are included in requests that * CloudFront sends to the origin. The additional headers are added by CloudFront. *

      *
    • * @see OriginRequestPolicyHeaderBehavior */ public String getHeaderBehavior() { return this.headerBehavior; } /** *

      * Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values * are: *

      *
        *
      • *

        * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even when this * field is set to none, any headers that are listed in a CachePolicy are included * in origin requests. *

        *
      • *
      • *

        * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

        *
      • *
      • *

        * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends to * the origin. *

        *
      • *
      • *

        * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional CloudFront * headers that are listed in the Headers type are included in requests that CloudFront sends to the * origin. The additional headers are added by CloudFront. *

        *
      • *
      * * @param headerBehavior * Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid * values are:

      *
        *
      • *

        * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even * when this field is set to none, any headers that are listed in a CachePolicy * are included in origin requests. *

        *
      • *
      • *

        * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

        *
      • *
      • *

        * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront * sends to the origin. *

        *
      • *
      • *

        * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional * CloudFront headers that are listed in the Headers type are included in requests that * CloudFront sends to the origin. The additional headers are added by CloudFront. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see OriginRequestPolicyHeaderBehavior */ public OriginRequestPolicyHeadersConfig withHeaderBehavior(String headerBehavior) { setHeaderBehavior(headerBehavior); return this; } /** *

        * Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values * are: *

        *
          *
        • *

          * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even when this * field is set to none, any headers that are listed in a CachePolicy are included * in origin requests. *

          *
        • *
        • *

          * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

          *
        • *
        • *

          * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends to * the origin. *

          *
        • *
        • *

          * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional CloudFront * headers that are listed in the Headers type are included in requests that CloudFront sends to the * origin. The additional headers are added by CloudFront. *

          *
        • *
        * * @param headerBehavior * Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid * values are:

        *
          *
        • *

          * none – HTTP headers are not included in requests that CloudFront sends to the origin. Even * when this field is set to none, any headers that are listed in a CachePolicy * are included in origin requests. *

          *
        • *
        • *

          * whitelist – The HTTP headers that are listed in the Headers type are included in * requests that CloudFront sends to the origin. *

          *
        • *
        • *

          * allViewer – All HTTP headers in viewer requests are included in requests that CloudFront * sends to the origin. *

          *
        • *
        • *

          * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional * CloudFront headers that are listed in the Headers type are included in requests that * CloudFront sends to the origin. The additional headers are added by CloudFront. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see OriginRequestPolicyHeaderBehavior */ public OriginRequestPolicyHeadersConfig withHeaderBehavior(OriginRequestPolicyHeaderBehavior headerBehavior) { this.headerBehavior = headerBehavior.toString(); return this; } /** * @param headers */ public void setHeaders(Headers headers) { this.headers = headers; } /** * @return */ public Headers getHeaders() { return this.headers; } /** * @param headers * @return Returns a reference to this object so that method calls can be chained together. */ public OriginRequestPolicyHeadersConfig withHeaders(Headers headers) { setHeaders(headers); 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 (getHeaderBehavior() != null) sb.append("HeaderBehavior: ").append(getHeaderBehavior()).append(","); if (getHeaders() != null) sb.append("Headers: ").append(getHeaders()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OriginRequestPolicyHeadersConfig == false) return false; OriginRequestPolicyHeadersConfig other = (OriginRequestPolicyHeadersConfig) obj; if (other.getHeaderBehavior() == null ^ this.getHeaderBehavior() == null) return false; if (other.getHeaderBehavior() != null && other.getHeaderBehavior().equals(this.getHeaderBehavior()) == false) return false; if (other.getHeaders() == null ^ this.getHeaders() == null) return false; if (other.getHeaders() != null && other.getHeaders().equals(this.getHeaders()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHeaderBehavior() == null) ? 0 : getHeaderBehavior().hashCode()); hashCode = prime * hashCode + ((getHeaders() == null) ? 0 : getHeaders().hashCode()); return hashCode; } @Override public OriginRequestPolicyHeadersConfig clone() { try { return (OriginRequestPolicyHeadersConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy