com.amazonaws.services.cloudfront.model

## Class InvalidationBatch

- java.lang.Object
- - com.amazonaws.services.cloudfront.model.InvalidationBatch

All Implemented Interfaces:
  Serializable, Cloneable

    public class InvalidationBatch
    extends Object
    implements Serializable, Cloneable

An invalidation batch.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`InvalidationBatch()` Default constructor for InvalidationBatch object.
`InvalidationBatch(Paths paths, String callerReference)` Constructs a new InvalidationBatch object.
`InvalidationBatch(String callerReference)` Constructs a new InvalidationBatch object.

### Method Summary

All Methods Instance Methods Concrete Methods
`InvalidationBatch` `clone()`
`boolean` `equals(Object obj)`
`String` `getCallerReference()` A value that you specify to uniquely identify an invalidation request.
`Paths` `getPaths()` A complex type that contains information about the objects that you want to invalidate.
`int` `hashCode()`
`void` `setCallerReference(String callerReference)` A value that you specify to uniquely identify an invalidation request.
`void` `setPaths(Paths paths)` A complex type that contains information about the objects that you want to invalidate.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`InvalidationBatch` `withCallerReference(String callerReference)` A value that you specify to uniquely identify an invalidation request.
`InvalidationBatch` `withPaths(Paths paths)` A complex type that contains information about the objects that you want to invalidate.

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### InvalidationBatch

    public InvalidationBatch()

Default constructor for InvalidationBatch object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.

#### InvalidationBatch

    public InvalidationBatch(Paths paths,
                             String callerReference)

Constructs a new InvalidationBatch object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
  `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.
  `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.

#### InvalidationBatch

    public InvalidationBatch(String callerReference)

Constructs a new InvalidationBatch object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
  `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.

### Method Detail

#### setPaths

    public void setPaths(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.

Parameters:
  `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.

#### getPaths

    public Paths getPaths()

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.

Returns:
  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.

#### withPaths

    public InvalidationBatch withPaths(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.

Parameters:
  `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.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setCallerReference

    public void setCallerReference(String 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.

Parameters:
  `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.

#### getCallerReference

    public String getCallerReference()

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.

Returns:
  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.

#### withCallerReference

    public InvalidationBatch withCallerReference(String 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.

Parameters:
  `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.

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

#### toString

    public String toString()

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

Overrides:
  `toString` in class `Object`
Returns:
  A string representation of this object.
See Also:
  `Object.toString()`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### clone

    public InvalidationBatch clone()

Overrides:
  `clone` in class `Object`