com.amazonaws.services.cloudfront.model

## Class CacheBehaviors

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

All Implemented Interfaces:
  Serializable, Cloneable

    public class CacheBehaviors
    extends Object
    implements Serializable, Cloneable

A complex type that contains zero or more `CacheBehavior` elements.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CacheBehaviors()`

### Method Summary

All Methods Instance Methods Concrete Methods
`CacheBehaviors` `clone()`
`boolean` `equals(Object obj)`
`List<CacheBehavior>` `getItems()` Optional: A complex type that contains cache behaviors for this distribution.
`Integer` `getQuantity()` The number of cache behaviors for this distribution.
`int` `hashCode()`
`void` `setItems(Collection<CacheBehavior> items)` Optional: A complex type that contains cache behaviors for this distribution.
`void` `setQuantity(Integer quantity)` The number of cache behaviors for this distribution.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`CacheBehaviors` `withItems(CacheBehavior... items)` Optional: A complex type that contains cache behaviors for this distribution.
`CacheBehaviors` `withItems(Collection<CacheBehavior> items)` Optional: A complex type that contains cache behaviors for this distribution.
`CacheBehaviors` `withQuantity(Integer quantity)` The number of cache behaviors for this distribution.

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

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

### Constructor Detail

#### CacheBehaviors

    public CacheBehaviors()

### Method Detail

#### setQuantity

    public void setQuantity(Integer quantity)

The number of cache behaviors for this distribution.

Parameters:
  `quantity` - The number of cache behaviors for this distribution.

#### getQuantity

    public Integer getQuantity()

The number of cache behaviors for this distribution.

Returns:
  The number of cache behaviors for this distribution.

#### withQuantity

    public CacheBehaviors withQuantity(Integer quantity)

The number of cache behaviors for this distribution.

Parameters:
  `quantity` - The number of cache behaviors for this distribution.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### getItems

    public List<CacheBehavior> getItems()

Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.

Returns:
  Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.

#### setItems

    public void setItems(Collection<CacheBehavior> items)

Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.

Parameters:
  `items` - Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.

#### withItems

    public CacheBehaviors withItems(CacheBehavior... items)

Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.

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` - Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### withItems

    public CacheBehaviors withItems(Collection<CacheBehavior> items)

Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.

Parameters:
  `items` - Optional: A complex type that contains cache behaviors for this distribution. If `Quantity` is `0`, you can omit `Items`.
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 CacheBehaviors clone()

Overrides:
  `clone` in class `Object`