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

com.amazonaws.services.cloudfront.model.InvalidationBatch 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 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;

/**
 * 

* An invalidation batch. *

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

* A complex type that contains information about the objects that you want to invalidate. For more information, see * Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. *

*/ private Paths paths; /** *

* A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to prevent you * from accidentally resubmitting an identical request. Whenever you create a new invalidation request, you must * specify a new value for CallerReference and change other values in the request as applicable. One * way to ensure that the value of CallerReference is unique is to use a timestamp, for * example, 20120301090000. *

*

* If you make a second invalidation request with the same value for CallerReference, and if the rest * of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront returns * information about the invalidation request that you previously created with the same CallerReference * . *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but the * content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. *

*/ private String callerReference; /** * Default constructor for InvalidationBatch object. Callers should use the setter or fluent setter (with...) * methods to initialize the object after creating it. */ public InvalidationBatch() { } /** * Constructs a new InvalidationBatch object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param paths * A complex type that contains information about the objects that you want to invalidate. For more * information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. * @param callerReference * A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to * prevent you from accidentally resubmitting an identical request. Whenever you create a new invalidation * request, you must specify a new value for CallerReference and change other values in the * request as applicable. One way to ensure that the value of CallerReference is unique is to * use a timestamp, for example, 20120301090000.

*

* If you make a second invalidation request with the same value for CallerReference, and if the * rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront * returns information about the invalidation request that you previously created with the same * CallerReference. *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but * the content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. */ public InvalidationBatch(Paths paths, String callerReference) { setPaths(paths); setCallerReference(callerReference); } /** * Constructs a new InvalidationBatch object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param callerReference * A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to * prevent you from accidentally resubmitting an identical request. Whenever you create a new invalidation * request, you must specify a new value for CallerReference and change other values in the * request as applicable. One way to ensure that the value of CallerReference is unique is to * use a timestamp, for example, 20120301090000.

*

* If you make a second invalidation request with the same value for CallerReference, and if the * rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront * returns information about the invalidation request that you previously created with the same * CallerReference. *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but * the content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. */ public InvalidationBatch(String callerReference) { setCallerReference(callerReference); } /** *

* A complex type that contains information about the objects that you want to invalidate. For more information, see * Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. *

* * @param paths * A complex type that contains information about the objects that you want to invalidate. For more * information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. */ public void setPaths(Paths paths) { this.paths = paths; } /** *

* A complex type that contains information about the objects that you want to invalidate. For more information, see * Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. *

* * @return A complex type that contains information about the objects that you want to invalidate. For more * information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. */ public Paths getPaths() { return this.paths; } /** *

* A complex type that contains information about the objects that you want to invalidate. For more information, see * Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. *

* * @param paths * A complex type that contains information about the objects that you want to invalidate. For more * information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public InvalidationBatch withPaths(Paths paths) { setPaths(paths); return this; } /** *

* A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to prevent you * from accidentally resubmitting an identical request. Whenever you create a new invalidation request, you must * specify a new value for CallerReference and change other values in the request as applicable. One * way to ensure that the value of CallerReference is unique is to use a timestamp, for * example, 20120301090000. *

*

* If you make a second invalidation request with the same value for CallerReference, and if the rest * of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront returns * information about the invalidation request that you previously created with the same CallerReference * . *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but the * content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. *

* * @param callerReference * A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to * prevent you from accidentally resubmitting an identical request. Whenever you create a new invalidation * request, you must specify a new value for CallerReference and change other values in the * request as applicable. One way to ensure that the value of CallerReference is unique is to * use a timestamp, for example, 20120301090000.

*

* If you make a second invalidation request with the same value for CallerReference, and if the * rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront * returns information about the invalidation request that you previously created with the same * CallerReference. *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but * the content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. */ public void setCallerReference(String callerReference) { this.callerReference = callerReference; } /** *

* A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to prevent you * from accidentally resubmitting an identical request. Whenever you create a new invalidation request, you must * specify a new value for CallerReference and change other values in the request as applicable. One * way to ensure that the value of CallerReference is unique is to use a timestamp, for * example, 20120301090000. *

*

* If you make a second invalidation request with the same value for CallerReference, and if the rest * of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront returns * information about the invalidation request that you previously created with the same CallerReference * . *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but the * content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. *

* * @return A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to * prevent you from accidentally resubmitting an identical request. Whenever you create a new invalidation * request, you must specify a new value for CallerReference and change other values in the * request as applicable. One way to ensure that the value of CallerReference is unique is to * use a timestamp, for example, 20120301090000.

*

* If you make a second invalidation request with the same value for CallerReference, and if * the rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead, * CloudFront returns information about the invalidation request that you previously created with the same * CallerReference. *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but * the content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. */ public String getCallerReference() { return this.callerReference; } /** *

* A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to prevent you * from accidentally resubmitting an identical request. Whenever you create a new invalidation request, you must * specify a new value for CallerReference and change other values in the request as applicable. One * way to ensure that the value of CallerReference is unique is to use a timestamp, for * example, 20120301090000. *

*

* If you make a second invalidation request with the same value for CallerReference, and if the rest * of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront returns * information about the invalidation request that you previously created with the same CallerReference * . *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but the * content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. *

* * @param callerReference * A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to * prevent you from accidentally resubmitting an identical request. Whenever you create a new invalidation * request, you must specify a new value for CallerReference and change other values in the * request as applicable. One way to ensure that the value of CallerReference is unique is to * use a timestamp, for example, 20120301090000.

*

* If you make a second invalidation request with the same value for CallerReference, and if the * rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead, CloudFront * returns information about the invalidation request that you previously created with the same * CallerReference. *

*

* If CallerReference is a value you already sent in a previous invalidation batch request but * the content of any Path is different from the original request, CloudFront returns an * InvalidationBatchAlreadyExists error. * @return Returns a reference to this object so that method calls can be chained together. */ public InvalidationBatch withCallerReference(String callerReference) { setCallerReference(callerReference); 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 (getPaths() != null) sb.append("Paths: ").append(getPaths()).append(","); if (getCallerReference() != null) sb.append("CallerReference: ").append(getCallerReference()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InvalidationBatch == false) return false; InvalidationBatch other = (InvalidationBatch) obj; if (other.getPaths() == null ^ this.getPaths() == null) return false; if (other.getPaths() != null && other.getPaths().equals(this.getPaths()) == false) return false; if (other.getCallerReference() == null ^ this.getCallerReference() == null) return false; if (other.getCallerReference() != null && other.getCallerReference().equals(this.getCallerReference()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPaths() == null) ? 0 : getPaths().hashCode()); hashCode = prime * hashCode + ((getCallerReference() == null) ? 0 : getCallerReference().hashCode()); return hashCode; } @Override public InvalidationBatch clone() { try { return (InvalidationBatch) 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