/* * Copyright 2018-2023 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; /** *
* A complex type that specifies a list of Lambda@Edge functions associations for a cache behavior. *
*
* If you want to invoke one or more Lambda@Edge functions triggered by requests that match the PathPattern
* of the cache behavior, specify the applicable values for Quantity
and Items
. Note that
* there can be up to 4 LambdaFunctionAssociation
items in this list (one for each possible value of
* EventType
) and each EventType
can be associated with only one function.
*
* If you don't want to invoke any Lambda@Edge functions for the requests that match PathPattern
, specify
* 0
for Quantity
and omit Items
.
*
* The number of Lambda@Edge function associations for this cache behavior. *
*/ private Integer quantity; /** *
* Optional: A complex type that contains LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
*
* The number of Lambda@Edge function associations for this cache behavior. *
* * @param quantity * The number of Lambda@Edge function associations for this cache behavior. */ public void setQuantity(Integer quantity) { this.quantity = quantity; } /** ** The number of Lambda@Edge function associations for this cache behavior. *
* * @return The number of Lambda@Edge function associations for this cache behavior. */ public Integer getQuantity() { return this.quantity; } /** ** The number of Lambda@Edge function associations for this cache behavior. *
* * @param quantity * The number of Lambda@Edge function associations for this cache behavior. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionAssociations withQuantity(Integer quantity) { setQuantity(quantity); return this; } /** *
* Optional: A complex type that contains LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
*
LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
*/
public java.util.List
* Optional: A complex type that contains LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
*
LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
*/
public void setItems(java.util.Collection
* Optional: A complex type that contains LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setItems(java.util.Collection)} or {@link #withItems(java.util.Collection)} if you want to override the * existing values. *
* * @param items * Optional: A complex type that containsLambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LambdaFunctionAssociations withItems(LambdaFunctionAssociation... items) {
if (this.items == null) {
setItems(new com.amazonaws.internal.SdkInternalList
* Optional: A complex type that contains LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
*
LambdaFunctionAssociation
items for this cache
* behavior. If Quantity
is 0
, you can omit Items
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LambdaFunctionAssociations withItems(java.util.Collection