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 the cookie preferences associated with this cache behavior.

 
 public class CookiePreference implements SerializableCloneable {

    
Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.

Constraints:
Allowed Values: none, whitelist, all

 
     private String forward;

    
A complex type that specifies the whitelisted cookies, if any, that you want CloudFront to forward to your origin that is associated with this cache behavior.
 
     private CookieNames whitelistedNames;

    
Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.

Constraints:
Allowed Values: none, whitelist, all

Returns:
Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.
See also:
ItemSelection
 
     public String getForward() {
         return ;
     }
    
    
Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.

Constraints:
Allowed Values: none, whitelist, all

Parameters:
forward Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.
See also:
ItemSelection
 
     public void setForward(String forward) {
         this. = forward;
     }
    
    
Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.

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

Constraints:
Allowed Values: none, whitelist, all

Parameters:
forward Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ItemSelection
    public CookiePreference withForward(String forward) {
        this. = forward;
        return this;
    }

    
Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.

Constraints:
Allowed Values: none, whitelist, all

Parameters:
forward Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.
See also:
ItemSelection
    public void setForward(ItemSelection forward) {
        this. = forward.toString();
    }
    
    
Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.

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

Constraints:
Allowed Values: none, whitelist, all

Parameters:
forward Use this element to specify whether you want CloudFront to forward cookies to the origin that is associated with this cache behavior. You can specify all, none or whitelist. If you choose All, CloudFront forwards all cookies regardless of how many your application uses.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ItemSelection
    public CookiePreference withForward(ItemSelection forward) {
        this. = forward.toString();
        return this;
    }

    
A complex type that specifies the whitelisted cookies, if any, that you want CloudFront to forward to your origin that is associated with this cache behavior.

Returns:
A complex type that specifies the whitelisted cookies, if any, that you want CloudFront to forward to your origin that is associated with this cache behavior.
    public CookieNames getWhitelistedNames() {
        return ;
    }
    
    
A complex type that specifies the whitelisted cookies, if any, that you want CloudFront to forward to your origin that is associated with this cache behavior.

Parameters:
whitelistedNames A complex type that specifies the whitelisted cookies, if any, that you want CloudFront to forward to your origin that is associated with this cache behavior.
    public void setWhitelistedNames(CookieNames whitelistedNames) {
        this. = whitelistedNames;
    }
    
    
A complex type that specifies the whitelisted cookies, if any, that you want CloudFront to forward to your origin that is associated with this cache behavior.

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

Parameters:
whitelistedNames A complex type that specifies the whitelisted cookies, if any, that you want CloudFront to forward to your origin that is associated with this cache behavior.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CookiePreference withWhitelistedNames(CookieNames whitelistedNames) {
        this. = whitelistedNames;
        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 (getForward() != nullsb.append("Forward: " + getForward() + ",");
        if (getWhitelistedNames() != nullsb.append("WhitelistedNames: " + getWhitelistedNames() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getForward() == null) ? 0 : getForward().hashCode()); 
        hashCode = prime * hashCode + ((getWhitelistedNames() == null) ? 0 : getWhitelistedNames().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CookiePreference == falsereturn false;
        CookiePreference other = (CookiePreference)obj;
        
        if (other.getForward() == null ^ this.getForward() == nullreturn false;
        if (other.getForward() != null && other.getForward().equals(this.getForward()) == falsereturn false
        if (other.getWhitelistedNames() == null ^ this.getWhitelistedNames() == nullreturn false;
        if (other.getWhitelistedNames() != null && other.getWhitelistedNames().equals(this.getWhitelistedNames()) == falsereturn false
        return true;
    }
    
    @Override
    public CookiePreference clone() {
        try {
            return (CookiePreferencesuper.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