/* * 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 contains the list of Custom Headers for each origin. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CustomHeaders implements Serializable, Cloneable { /** ** The number of custom headers, if any, for this distribution. *
*/ private Integer quantity; /** *
* Optional: A list that contains one OriginCustomHeader
element for each custom header that you
* want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
*
* The number of custom headers, if any, for this distribution. *
* * @param quantity * The number of custom headers, if any, for this distribution. */ public void setQuantity(Integer quantity) { this.quantity = quantity; } /** ** The number of custom headers, if any, for this distribution. *
* * @return The number of custom headers, if any, for this distribution. */ public Integer getQuantity() { return this.quantity; } /** ** The number of custom headers, if any, for this distribution. *
* * @param quantity * The number of custom headers, if any, for this distribution. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomHeaders withQuantity(Integer quantity) { setQuantity(quantity); return this; } /** *
* Optional: A list that contains one OriginCustomHeader
element for each custom header that you
* want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
*
OriginCustomHeader
element for each custom header
* that you want CloudFront to forward to the origin. If Quantity is 0
, omit Items
* .
*/
public java.util.List
* Optional: A list that contains one OriginCustomHeader
element for each custom header that you
* want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
*
OriginCustomHeader
element for each custom header
* that you want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
*/
public void setItems(java.util.Collection
* Optional: A list that contains one OriginCustomHeader
element for each custom header that you
* want CloudFront to forward to the origin. If Quantity is 0
, 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 list that contains oneOriginCustomHeader
element for each custom header
* that you want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomHeaders withItems(OriginCustomHeader... items) {
if (this.items == null) {
setItems(new com.amazonaws.internal.SdkInternalList
* Optional: A list that contains one OriginCustomHeader
element for each custom header that you
* want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
*
OriginCustomHeader
element for each custom header
* that you want CloudFront to forward to the origin. If Quantity is 0
, omit Items
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomHeaders withItems(java.util.Collection