Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 

A complex type that specifies how CloudFront handles query strings, cookies and headers.

 
 public class ForwardedValues implements SerializableCloneable {

    
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.
 
     private Boolean queryString;

    
A complex type that specifies how CloudFront handles cookies.
 
     private CookiePreference cookies;

    
A complex type that specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior.
 
     private Headers headers;

    
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.

Returns:
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.
 
     public Boolean isQueryString() {
         return ;
     }
    
    
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.

Parameters:
queryString Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.
 
     public void setQueryString(Boolean queryString) {
         this. = queryString;
     }
    
    
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.

Returns a reference to this object so that method calls can be chained together.

Parameters:
queryString Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ForwardedValues withQueryString(Boolean queryString) {
         this. = queryString;
         return this;
     }

    
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.

Returns:
Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior. If so, specify true; if not, specify false.
 
     public Boolean getQueryString() {
        return ;
    }

    
A complex type that specifies how CloudFront handles cookies.

Returns:
A complex type that specifies how CloudFront handles cookies.
    public CookiePreference getCookies() {
        return ;
    }
    
    
A complex type that specifies how CloudFront handles cookies.

Parameters:
cookies A complex type that specifies how CloudFront handles cookies.
    public void setCookies(CookiePreference cookies) {
        this. = cookies;
    }
    
    
A complex type that specifies how CloudFront handles cookies.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cookies A complex type that specifies how CloudFront handles cookies.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ForwardedValues withCookies(CookiePreference cookies) {
        this. = cookies;
        return this;
    }

    
A complex type that specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior.

Returns:
A complex type that specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior.
    public Headers getHeaders() {
        return ;
    }
    
    
A complex type that specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior.

Parameters:
headers A complex type that specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior.
    public void setHeaders(Headers headers) {
        this. = headers;
    }
    
    
A complex type that specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior.

Returns a reference to this object so that method calls can be chained together.

Parameters:
headers A complex type that specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ForwardedValues withHeaders(Headers headers) {
        this. = headers;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (isQueryString() != nullsb.append("QueryString: " + isQueryString() + ",");
        if (getCookies() != nullsb.append("Cookies: " + getCookies() + ",");
        if (getHeaders() != nullsb.append("Headers: " + getHeaders() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((isQueryString() == null) ? 0 : isQueryString().hashCode()); 
        hashCode = prime * hashCode + ((getCookies() == null) ? 0 : getCookies().hashCode()); 
        hashCode = prime * hashCode + ((getHeaders() == null) ? 0 : getHeaders().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ForwardedValues == falsereturn false;
        ForwardedValues other = (ForwardedValues)obj;
        
        if (other.isQueryString() == null ^ this.isQueryString() == nullreturn false;
        if (other.isQueryString() != null && other.isQueryString().equals(this.isQueryString()) == falsereturn false
        if (other.getCookies() == null ^ this.getCookies() == nullreturn false;
        if (other.getCookies() != null && other.getCookies().equals(this.getCookies()) == falsereturn false
        if (other.getHeaders() == null ^ this.getHeaders() == nullreturn false;
        if (other.getHeaders() != null && other.getHeaders().equals(this.getHeaders()) == falsereturn false
        return true;
    }
    
    @Override
    public ForwardedValues clone() {
        try {
            return (ForwardedValuessuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X