com.amazonaws.services.cloudfront.model

## Class CustomErrorResponses

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

All Implemented Interfaces:
  Serializable, Cloneable

    public class CustomErrorResponses
    extends Object
    implements Serializable, Cloneable

A complex type that controls:

- Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.

- How long CloudFront caches HTTP status codes in the 4xx and 5xx range.

For more information about custom error pages, see Customizing Error Responses in the Amazon CloudFront Developer Guide.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CustomErrorResponses()`

### Method Summary

All Methods Instance Methods Concrete Methods
`CustomErrorResponses` `clone()`
`boolean` `equals(Object obj)`
`List<CustomErrorResponse>` `getItems()` A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.
`Integer` `getQuantity()` The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration.
`int` `hashCode()`
`void` `setItems(Collection<CustomErrorResponse> items)` A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.
`void` `setQuantity(Integer quantity)` The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`CustomErrorResponses` `withItems(Collection<CustomErrorResponse> items)` A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.
`CustomErrorResponses` `withItems(CustomErrorResponse... items)` A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.
`CustomErrorResponses` `withQuantity(Integer quantity)` The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration.

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

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

### Constructor Detail

#### CustomErrorResponses

    public CustomErrorResponses()

### Method Detail

#### setQuantity

    public void setQuantity(Integer quantity)

The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If `Quantity` is `0`, you can omit `Items`.

Parameters:
  `quantity` - The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If `Quantity` is `0`, you can omit `Items`.

#### getQuantity

    public Integer getQuantity()

The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If `Quantity` is `0`, you can omit `Items`.

Returns:
  The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If `Quantity` is `0`, you can omit `Items`.

#### withQuantity

    public CustomErrorResponses withQuantity(Integer quantity)

The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If `Quantity` is `0`, you can omit `Items`.

Parameters:
  `quantity` - The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If `Quantity` is `0`, you can omit `Items`.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### getItems

    public List<CustomErrorResponse> getItems()

A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.

Returns:
  A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.

#### setItems

    public void setItems(Collection<CustomErrorResponse> items)

A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.

Parameters:
  `items` - A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.

#### withItems

    public CustomErrorResponses withItems(CustomErrorResponse... items)

A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.

NOTE: This method appends the values to the existing list (if any). Use `setItems(java.util.Collection)` or `withItems(java.util.Collection)` if you want to override the existing values.

Parameters:
  `items` - A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### withItems

    public CustomErrorResponses withItems(Collection<CustomErrorResponse> items)

A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.

Parameters:
  `items` - A complex type that contains a `CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.
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 CustomErrorResponses clone()

Overrides:
  `clone` in class `Object`